Fix search highlighting conflict with jsx code (#1886)

Replaces "<>", "</>" highlighting marks with "<|[[--" and "--]]|>" to avoid conflicts when highlighting jsx code.
This commit is contained in:
Sebastian Sdorra
2021-12-06 16:49:31 +01:00
committed by GitHub
parent e4936260a1
commit ad5bbfeef3
5 changed files with 13 additions and 9 deletions

View File

@@ -55,7 +55,6 @@ public final class LuceneHighlighter {
fragments = keepWholeLine(value, fragments);
}
return Arrays.stream(fragments)
.map(fragment -> fragment.replace(PRE_TAG, "<>").replace(POST_TAG, "</>"))
.toArray(String[]::new);
}