Skip to content
Snippets Groups Projects
Commit 6d0c99a4 authored by alexey-k's avatar alexey-k Committed by Marijn Haverbeke
Browse files

The extension now handles escaped quotes. So, the following code is formatted correctly:

test="<a href=# onclick=\"alert(); return false;\">test</a>";

Previous (incorrect) behavior was:
test="<a href=# onclick=\"alert();
   return false;
\">test</a>"
parent 9b6d5b97
No related branches found
No related tags found
No related merge requests found
......@@ -98,6 +98,8 @@ CodeMirror.modeExtensions["javascript"] = {
getNonBreakableBlocks: function (text) {
var nonBreakableRegexes = [
new RegExp("for\\s*?\\(([\\s\\S]*?)\\)"),
new RegExp("\\\\\"([\\s\\S]*?)(\\\\\"|$)"),
new RegExp("\\\\\'([\\s\\S]*?)(\\\\\'|$)"),
new RegExp("'([\\s\\S]*?)('|$)"),
new RegExp("\"([\\s\\S]*?)(\"|$)"),
new RegExp("//.*([\r\n]|$)")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment