Skip to content

Commit 6c3cc96

Browse files
committed
Fix bug found by random testing
related to #14
1 parent 06f5504 commit 6c3cc96

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

syntax-color-lib/syntax-color/scribble-lexer.rkt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
(byte-rx #"^[|]" re-opener #"{")
193193
(byte-rx #".*?(?:(?=[|]"
194194
re-opener
195-
#"[" (regexp-quote at-bytes) #"{])|(?="
195+
#"(" (regexp-quote at-bytes) #"|{))|(?="
196196
closer
197197
#")|(?=[\r\n])|$)")
198198
'|{| ;; Better complex paren?

syntax-color-test/tests/syntax-color/scribble-lexer.rkt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,3 +276,5 @@
276276
(4 parenthesis)))
277277

278278
(test/chars '(#\^) "\\" '((1 text)))
279+
280+
(test/chars (remove #\\ chars) "@|{|\\" '((3 parenthesis) (2 text)))

0 commit comments

Comments
 (0)