File tree Expand file tree Collapse file tree
autoload/editorconfig_core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,22 +45,24 @@ if !exists('g:editorconfig_core_vimscript_debug')
4545endif
4646" }}}1
4747" === Regexes =========================================================== {{{1
48- let s: LEFT_BRACE = ' \v%(^|[^\\])\{'
48+ let s: LEFT_BRACE = ' \v[\\]@8<!\{'
49+ " 8 is an arbitrary byte-count limit to the lookbehind (micro-optimization)
4950" LEFT_BRACE = re.compile(
5051" r"""
5152"
52- " (?: ^ | [^\\] ) # Beginning of string or a character besides "\"
53+ " (?<! \\ ) # Not preceded by "\"
5354"
5455" \{ # "{"
5556"
5657" """, re.VERBOSE
5758" )
5859
59- let s: RIGHT_BRACE = ' \v%(^|[^\\])\}'
60+ let s: RIGHT_BRACE = ' \v[\\]@8<!\}'
61+ " 8 is an arbitrary byte-count limit to the lookbehind (micro-optimization)
6062" RIGHT_BRACE = re.compile(
6163" r"""
6264"
63- " (?: ^ | [^\\] ) # Beginning of string or a character besides "\"
65+ " (?<! \\ ) # Not preceded by "\"
6466"
6567" \} # "}"
6668"
You can’t perform that action at this time.
0 commit comments