diff --git a/syntax-color-lib/syntax-color/scribble-lexer.rkt b/syntax-color-lib/syntax-color/scribble-lexer.rkt index 1db28ff..97b4928 100644 --- a/syntax-color-lib/syntax-color/scribble-lexer.rkt +++ b/syntax-color-lib/syntax-color/scribble-lexer.rkt @@ -192,7 +192,7 @@ (byte-rx #"^[|]" re-opener #"{") (byte-rx #".*?(?:(?=[|]" re-opener - #"[" (regexp-quote at-bytes) #"{])|(?=" + #"(" (regexp-quote at-bytes) #"|{))|(?=" closer #")|(?=[\r\n])|$)") '|{| ;; Better complex paren? diff --git a/syntax-color-test/tests/syntax-color/scribble-lexer.rkt b/syntax-color-test/tests/syntax-color/scribble-lexer.rkt index 6e7c315..48ce2bb 100644 --- a/syntax-color-test/tests/syntax-color/scribble-lexer.rkt +++ b/syntax-color-test/tests/syntax-color/scribble-lexer.rkt @@ -276,3 +276,5 @@ (4 parenthesis))) (test/chars '(#\^) "\\" '((1 text))) + +(test/chars (remove #\\ chars) "@|{|\\" '((3 parenthesis) (2 text)))