Skip to content

Commit 3cd3722

Browse files
committed
fixed highlight in quotes
1 parent b5c3e4b commit 3cd3722

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

vis/js/components/Highlight.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ const hyphenateStringSafely = (string) => {
9898
* @param {boolean} useLookBehind use ?<= if true, else use \b
9999
*/
100100
export const getQueryTermMatcher = (term, useLookBehind) => {
101-
// this should theoretically work but it does not: [^\w\u00AD] (??? is this still true?)
102-
// this is used instead:
103-
const wordBreakers = "[-\\s.,:;?!/()[\\]{}]";
101+
// former regex: [-\\s.,:;?!/()[\\]{}]
102+
const wordBreakers = "[^\\w\u00AD]";
104103
let lookBehind = `(?<=${wordBreakers}|^)`;
105104
if (!useLookBehind) {
106105
lookBehind = "\\b";

0 commit comments

Comments
 (0)