Skip to content

Commit

Permalink
Add suggestion to check top element before first grandchild element.
Browse files Browse the repository at this point in the history
  • Loading branch information
henning-gerhardt committed Nov 30, 2023
1 parent 2636e12 commit d24ce9b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ private String determineReplacementForMetadata(Matcher variableFinder) {
if (!allChildren.isEmpty()) {
allFirstchildValue = MetadataEditor.getMetadataValue(allChildren.get(0), variableFinder.group(5));
if (Objects.isNull(allFirstchildValue)) {
allFirstchildValue = determineReplacementForTopstruct(variableFinder, dollarSignIfToKeep);
}
if (Objects.isNull(allFirstchildValue) || StringUtils.isEmpty(allFirstchildValue)) {
List<LogicalDivision> firstChildChildren = allChildren.get(0).getChildren();
if (!firstChildChildren.isEmpty()) {
allFirstchildValue = MetadataEditor.getMetadataValue(firstChildChildren.get(0), variableFinder.group(5));
Expand Down

0 comments on commit d24ce9b

Please sign in to comment.