Skip to content
Snippets Groups Projects
Commit a29e5169 authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[handlebars and nsis modes] Do tokenize mismatched quotes as strings

So that autoclosing works.

Issue #3660
parent daad4a60
No related branches found
No related tags found
No related merge requests found
......@@ -21,8 +21,8 @@
{ regex: /\}\}/, pop: true, token: "tag" },
// Double and single quotes
{ regex: /"(?:[^\\]|\\.)*?"/, token: "string" },
{ regex: /'(?:[^\\]|\\.)*?'/, token: "string" },
{ regex: /"(?:[^\\"]|\\.)*"?/, token: "string" },
{ regex: /'(?:[^\\']|\\.)*'?/, token: "string" },
// Handlebars keywords
{ regex: />|[#\/]([A-Za-z_]\w*)/, token: "keyword" },
......
......@@ -19,9 +19,9 @@ CodeMirror.defineSimpleMode("nsis",{
{regex: /(?:[+-]?)(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\d+.?\d*)/, token: "number"},
// Strings
{ regex: /"(?:[^\\]|\\.)*?"/, token: "string" },
{ regex: /'(?:[^\\]|\\.)*?'/, token: "string" },
{ regex: /`(?:[^\\]|\\.)*?`/, token: "string" },
{ regex: /"(?:[^\\"]|\\.)*"?/, token: "string" },
{ regex: /'(?:[^\\']|\\.)*'?/, token: "string" },
{ regex: /`(?:[^\\`]|\\.)*`?/, token: "string" },
// Compile Time Commands
{regex: /(?:\!(include|addincludedir|addplugindir|appendfile|cd|delfile|echo|error|execute|packhdr|finalize|getdllversion|system|tempfile|warning|verbose|define|undef|insertmacro|makensis|searchparse|searchreplace))\b/, token: "keyword"},
......
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