Pull request #32: Remove '-' in headernames
Merge in RED/redaction-service from tablesHeader3 to master * commit '272c7cc2287b146664b8bb277c3731262ac78a19': Remove '-' in headernames
This commit is contained in:
commit
6483e637c6
@ -37,7 +37,8 @@ public class Section {
|
||||
|
||||
public boolean rowEquals(String headerName, String value){
|
||||
String cleanHeaderName = headerName.replaceAll("\n", "")
|
||||
.replaceAll(" ", "");
|
||||
.replaceAll(" ", "")
|
||||
.replaceAll("-", "");
|
||||
|
||||
return tabularData != null && tabularData.containsKey(cleanHeaderName) && tabularData.get(cleanHeaderName).getText().equals(value);
|
||||
}
|
||||
@ -173,7 +174,8 @@ public class Section {
|
||||
public void highlightCell(String cellHeader, int ruleNumber, String type) {
|
||||
|
||||
String cleanHeaderName = cellHeader.replaceAll("\n", "")
|
||||
.replaceAll(" ", "");
|
||||
.replaceAll(" ", "")
|
||||
.replaceAll("-", "");
|
||||
|
||||
TextBlock value = tabularData.get(cleanHeaderName);
|
||||
if (value == null) {
|
||||
|
||||
@ -65,7 +65,8 @@ public class EntityRedactionService {
|
||||
headerCell.getTextBlocks().forEach(textBlock -> headerBuilder.append(textBlock.getText()));
|
||||
String headerName = headerBuilder.toString()
|
||||
.replaceAll("\n", "")
|
||||
.replaceAll(" ", "");
|
||||
.replaceAll(" ", "")
|
||||
.replaceAll("-", "");
|
||||
tabularData.put(headerName, cell.getTextBlocks().get(0));
|
||||
});
|
||||
for (TextBlock textBlock : cell.getTextBlocks()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user