Skip to content

Commit 23fa4fb

Browse files
committed
clojureRegexpEscape changes
* Remove \. since it expands to its literal self, unlike \t or \011 * Limit the \x{…} digits to the strlen of Character.MAX_CODE_POINT in hexadecimal. The compiler accepts any length of leading zeroes in the braces, but the docs only define from MIN_CODE_POINT to MAX_CODE_POINT
1 parent 560b3df commit 23fa4fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

syntax/clojure.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ syntax match clojureDispatch "\v#[\^'=<_]?"
7575
" Clojure permits no more than 20 params.
7676
syntax match clojureAnonArg "%\(20\|1\d\|[1-9]\|&\)\?"
7777

78-
syntax match clojureRegexpEscape "\v\\%(\\|[tnrfae]|c\u|0[0-3]?\o{1,2}|x%(\x{2}|\{\x{1,9}\})|u\x{4}|.)" contained display
78+
syntax match clojureRegexpEscape "\v\\%(\\|[tnrfae]|c\u|0[0-3]?\o{1,2}|x%(\x{2}|\{\x{1,6}\})|u\x{4})" contained display
7979
syntax region clojureRegexpQuoted start=/\v\<@!\\Q/ms=e+1 skip=/\v\\\\|\\"/ end=/\\E/me=s-1 end=/"/me=s-1 contained
8080
syntax region clojureRegexpQuote start=/\v\<@!\\Q/ skip=/\v\\\\|\\"/ end=/\\E/ end=/"/me=s-1 contains=clojureRegexpQuoted keepend contained
8181
syntax cluster clojureRegexpEscapes contains=clojureRegexpEscape,clojureRegexpQuote

0 commit comments

Comments
 (0)