mirror of
https://github.com/kennethreitz-archive/kJS.tmbundle.git
synced 2026-06-05 23:50:19 +00:00
Improved String Literal syntax. Fixed the "bug" where an unclosed string extends past the closign script tag in html.
String should end on \n with a syntax error String should end on </script>\n with a syntax error String should mark </script> as invalid git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@10170 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
This commit is contained in:
@@ -356,7 +356,7 @@
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>'</string>
|
||||
<string>(?i)'|(?=</\s*script\s*>\s*\n)|(?<=[^\\]\n)</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
@@ -375,6 +375,24 @@
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\\n</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.newline.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\n</string>
|
||||
<key>name</key>
|
||||
<string>invalid.illegal.newline.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i)</\s*script\s*></string>
|
||||
<key>name</key>
|
||||
<string>invalid.deprecated.inconsistent.js</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
@@ -389,7 +407,7 @@
|
||||
</dict>
|
||||
</dict>
|
||||
<key>end</key>
|
||||
<string>"</string>
|
||||
<string>(?i)"|(?=</\s*script\s*>\s*\n)|(?<=[^\\]\n)</string>
|
||||
<key>endCaptures</key>
|
||||
<dict>
|
||||
<key>0</key>
|
||||
@@ -408,6 +426,24 @@
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\\\n</string>
|
||||
<key>name</key>
|
||||
<string>constant.character.escape.newline.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>\n</string>
|
||||
<key>name</key>
|
||||
<string>invalid.illegal.newline.js</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i)</\s*script\s*></string>
|
||||
<key>name</key>
|
||||
<string>invalid.deprecated.inconsistent.js</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
@@ -676,6 +712,11 @@
|
||||
<string>meta.complete.method</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>repository</key>
|
||||
<dict>
|
||||
<key>string-double</key>
|
||||
<dict/>
|
||||
</dict>
|
||||
<key>scopeName</key>
|
||||
<string>source.js</string>
|
||||
<key>uuid</key>
|
||||
|
||||
Reference in New Issue
Block a user