mirror of
https://github.com/kennethreitz-archive/kJS.tmbundle.git
synced 2026-06-05 23:50:19 +00:00
Fixed a strange issue with the folding & indent. It wasn't properly matching escaped strings inside strings
This commit is contained in:
@@ -12,17 +12,17 @@
|
||||
</array>
|
||||
<key>foldingStartMarker</key>
|
||||
<string>(?x)^ \s* (?!//|/\*)([^\s].*)?
|
||||
# Open (nothing | ( string | no parens )+ | (no parens? (nested parens ) no parens?)+ )
|
||||
( \[ (?: | ( (?<str> '(\\'|[^'])*+' | "(\\"|[^"])*+" | /(\\/|[^/])*+/) | (?<noR>[^\[\]'"/]++) )++ | (\g<noR>? (?<round> \[ (?: \g<str> | \g<noR> | \g<round> )* \] ) \g<noR>? )++ )
|
||||
| \( (?: | ( \g<str> | (?<noS>[^\(\)'"/]++) )++ | (\g<noS>? (?<squar> \( (?: \g<str> | \g<noS> | \g<squar> )* \) ) \g<noS>? )++ )
|
||||
| \{ (?: | ( \g<str> | (?<noC>[^\{\}'"/]++) )++ | (\g<noC>? (?<curly> \{ (?: \g<str> | \g<noC> | \g<curly> )* \} ) \g<noC>? )++ )
|
||||
# Open (nothing |( string | no parens/string )++ | (no parens? (nested parens ) no parens?)+ )
|
||||
( \[ (?: |( (?<str> (?<!\\)'(\\'|[^'])*+' | (?<!\\)"(\\"|[^"])*+" | (?<!\\)/(\\/|[^/])*+/) | (?<noS>[^\[\]'"/]++) )++ | (\g<noS>? (?<squar> \[ (?: \g<str> | \g<noS> | \g<squar> )* \] ) \g<noS>? )++ )
|
||||
| \( (?: |( \g<str> | (?<noR>[^\(\)'"/]++) )++ | (\g<noR>? (?<round> \( (?: \g<str> | \g<noR> | \g<round> )* \) ) \g<noR>? )++ )
|
||||
| \{ (?: |( \g<str> | (?<noC>[^\{\}'"/]++) )++ | (\g<noC>? (?<curly> \{ (?: \g<str> | \g<noC> | \g<curly> )* \} ) \g<noC>? )++ )
|
||||
)$</string>
|
||||
<key>foldingStopMarker</key>
|
||||
<string>(?x)^ \s* (?!//|/\*)
|
||||
# (nothing | ( string | no parens )+ | (no parens? (nested parens ) no parens?)+ ) Close
|
||||
( (?: | ( (?<str> '(\\'|[^'])*+' | "(\\"|[^"])*+" | /(\\/|[^/])*+/) | (?<noR>[^\[\]'"/]++) )++ | (\g<noR>? (?<round> \[ (?: \g<str> | \g<noR> | \g<round> )* \] ) \g<noR>? )++ ) \]
|
||||
| (?: | ( \g<str> | (?<noS>[^\(\)'"/]++) )++ | (\g<noS>? (?<squar> \( (?: \g<str> | \g<noS> | \g<squar> )* \) ) \g<noS>? )++ ) \)
|
||||
| (?: | ( \g<str> | (?<noC>[^\{\}'"/]++) )++ | (\g<noC>? (?<curly> \{ (?: \g<str> | \g<noC> | \g<curly> )* \} ) \g<noC>? )++ ) \}
|
||||
# (nothing |( string | no parens/string )++ | (no parens? (nested parens ) no parens?)+ ) Close
|
||||
( (?: |( (?<str> (?<!\\)'(\\'|[^'])*+' | (?<!\\)"(\\"|[^"])*+" | (?<!\\)/(\\/|[^/])*+/) | (?<noS>[^\[\]'"/]++) )++ | (\g<noS>? (?<squar> \[ (?: \g<str> | \g<noS> | \g<squar> )* \] ) \g<noS>? )++ ) \]
|
||||
| (?: |( \g<str> | (?<noR>[^\(\)'"/]++) )++ | (\g<noR>? (?<round> \( (?: \g<str> | \g<noR> | \g<round> )* \) ) \g<noR>? )++ ) \)
|
||||
| (?: |( \g<str> | (?<noC>[^\{\}'"/]++) )++ | (\g<noC>? (?<curly> \{ (?: \g<str> | \g<noC> | \g<curly> )* \} ) \g<noC>? )++ ) \}
|
||||
)</string>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~J</string>
|
||||
|
||||
Reference in New Issue
Block a user