Skip to content

Commit

Permalink
Revert "--bugfix=Fix the issue:Rosemoe#602"
Browse files Browse the repository at this point in the history
  • Loading branch information
teixeira0x authored Aug 22, 2024
1 parent 4f3e36a commit 9df43ad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void putPair(char[] charArray, SymbolPair symbolPair) {
}

list.add(symbolPair);
multipleCharByEndPairMaps.put(endChar, list);
multipleCharByEndPairMaps.put(charArray[charArray.length - 1], list);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,19 @@ public void updatePair() {
var newPair = new AutoClosingPairConditional(surroundingPair.open, surroundingPair.close,
surroundingPairFlagWithList);

var mergePairIndex = mergePairs.indexOf(newPair);

if (mergePairIndex >= 0) {
var mergePair = mergePairs.get(mergePairIndex);

if (mergePair.notIn == null || mergePair.notIn.isEmpty()) {
mergePairs.add(newPair);
continue;
}

mergePair.notIn.add(surroundingPairFlag);

}
mergePairs.add(newPair);
}
}
Expand Down

0 comments on commit 9df43ad

Please sign in to comment.