Try to fix problem with js syntax of '/=' operator

The operator '/=' was wrongly considered by the js syntax file as the
beginning of a regexp literal.

With this modification we modify the pattern for regexp literals to not
match expressions starting with '/='.

This doesn't seem entirely correct because apparently javascript can accept
regexp literals starting with '/=' but the rule used by the javascript
lexer is not known.
This commit is contained in:
Francesco Abbate 2021-09-06 09:31:17 +02:00
parent f69e42a43c
commit 4f68f7fd92
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ syntax.add {
patterns = {
{ pattern = "//.-\n", type = "comment" },
{ pattern = { "/%*", "%*/" }, type = "comment" },
{ pattern = { '/%g', '/', '\\' }, type = "string" },
{ pattern = { '/[^= ]', '/', '\\' },type = "string" },
{ pattern = { '"', '"', '\\' }, type = "string" },
{ pattern = { "'", "'", '\\' }, type = "string" },
{ pattern = { "`", "`", '\\' }, type = "string" },