Some fixes in javascript highlighter.

[GB.HIGHLIGHT]
* BUG: Some fixes in javascript highlighter.
This commit is contained in:
Benoît Minisini 2023-10-20 03:03:07 +02:00
parent 3b9b1d8bfd
commit f3618751d8
3 changed files with 16 additions and 8 deletions

View file

@ -4,8 +4,8 @@ Public Sub Main()
Dim hTextHighlighter As TextHighlighter
hTextHighlighter = TextHighlighter.FromFile("./highlight/html.highlight")
hTextHighlighter = TextHighlighter.FromFile("./highlight/javascript.highlight")
File.Save("~/test.html", hTextHighlighter.ToHTML(File.Load("custom/page.html")))
File.Save("~/test.html", hTextHighlighter.ToHTML(File.Load("custom/selectr.js")))
End

View file

@ -17,7 +17,7 @@
}(this, function(plugin) {
'use strict';
console.log(`this is a {plugin} plugin.`);
console.log(`this \x2B \u0640 is a {plugin} plugin.\n`);
/**
* Event Emitter

View file

@ -7,17 +7,25 @@ string:
from " to "
from ' to '
escape:
match \\[ntrbf0'"\\]
match \\[fnrtv0'"\\]
match \\c[A-Za-z]
match \\x[0-9a-fA-F]{2}
match \\u[0-9a-fA-F]{4}
match \\u{[0-9a-fA-F]+}
sstring{String}:
from ` to `
escape:
match \\[ntrbf0'"{\\]
match \\[fnrtv0'"\\]
match \\c[A-Za-z]
match \\x[0-9a-fA-F]{2}
match \\u[0-9a-fA-F]{4}
match \\u{[0-9a-fA-F]+}
subst{Preprocessor}:
between { }
regexp{Datatype}:
match /.*/[a-z]*
escape:
match \\?
match /.*?/[a-z]*
regexp.escape{Escape}:
match \\.
number:
match [+-]?[0-9.]*
match 0x[0-9a-fA-F]*