[chore]: Update syntax
Harmonizing the syntax files Now inline comment are a single string instead of a table of strings. -(language_c): Removed whitespaces breaking indent -(language_html): Removed trailing whitespace
This commit is contained in:
parent
e646f2fb28
commit
030dcc1e62
|
@ -7,7 +7,7 @@ syntax.add {
|
|||
comment = "//",
|
||||
block_comment = { "/*", "*/" },
|
||||
patterns = {
|
||||
{ pattern = "//.-\n", type = "comment" },
|
||||
{ pattern = "//.*$", type = "comment" },
|
||||
{ pattern = { "/%*", "%*/" }, type = "comment" },
|
||||
{ pattern = { '"', '"', '\\' }, type = "string" },
|
||||
{ pattern = { "'", "'", '\\' }, type = "string" },
|
||||
|
|
|
@ -10,7 +10,7 @@ syntax.add {
|
|||
comment = "//",
|
||||
block_comment = { "/*", "*/" },
|
||||
patterns = {
|
||||
{ pattern = "//.-\n", type = "comment" },
|
||||
{ pattern = "//.*$", type = "comment" },
|
||||
{ pattern = { "/%*", "%*/" }, type = "comment" },
|
||||
{ pattern = { '"', '"', '\\' }, type = "string" },
|
||||
{ pattern = { "'", "'", '\\' }, type = "string" },
|
||||
|
|
|
@ -7,7 +7,7 @@ syntax.add {
|
|||
block_comment = { "/*", "*/" },
|
||||
patterns = {
|
||||
{ pattern = "\\.", type = "normal" },
|
||||
{ pattern = "//.-\n", type = "comment" },
|
||||
{ pattern = "//.*$", type = "comment" },
|
||||
{ pattern = { "/%*", "%*/" }, type = "comment" },
|
||||
{ pattern = { '"', '"', '\\' }, type = "string" },
|
||||
{ pattern = { "'", "'", '\\' }, type = "string" },
|
||||
|
|
|
@ -7,7 +7,7 @@ syntax.add {
|
|||
comment = "//",
|
||||
block_comment = { "/*", "*/" },
|
||||
patterns = {
|
||||
{ pattern = "//.-\n", type = "comment" },
|
||||
{ pattern = "//.*$", type = "comment" },
|
||||
{ pattern = { "/%*", "%*/" }, type = "comment" },
|
||||
{ pattern = { '/[^= ]', '/', '\\' },type = "string" },
|
||||
{ pattern = { '"', '"', '\\' }, type = "string" },
|
||||
|
|
|
@ -12,7 +12,7 @@ syntax.add {
|
|||
{ pattern = { "'", "'", '\\' }, type = "string" },
|
||||
{ pattern = { "%[%[", "%]%]" }, type = "string" },
|
||||
{ pattern = { "%-%-%[%[", "%]%]"}, type = "comment" },
|
||||
{ pattern = "%-%-.-\n", type = "comment" },
|
||||
{ pattern = "%-%-.*$", type = "comment" },
|
||||
{ pattern = "0x%x+%.%x*[pP][-+]?%d+", type = "number" },
|
||||
{ pattern = "0x%x+%.%x*", type = "number" },
|
||||
{ pattern = "0x%.%x+[pP][-+]?%d+", type = "number" },
|
||||
|
|
|
@ -51,7 +51,7 @@ syntax.add {
|
|||
type = { "function", "number", "function" }
|
||||
},
|
||||
{
|
||||
pattern = "^%s*%[%^?()["..in_squares_match.."]+()%]:%s+.+\n",
|
||||
pattern = "^%s*%[%^?()["..in_squares_match.."]+()%]:%s+.+$",
|
||||
type = { "function", "number", "function" }
|
||||
},
|
||||
-- optimization
|
||||
|
@ -154,9 +154,9 @@ syntax.add {
|
|||
-- highlight
|
||||
{ pattern = { "==", "==" }, type = "literal" },
|
||||
-- lines
|
||||
{ pattern = "^%-%-%-+\n", type = "comment" },
|
||||
{ pattern = "^%*%*%*+\n", type = "comment" },
|
||||
{ pattern = "^___+\n", type = "comment" },
|
||||
{ pattern = "^%-%-%-+$" , type = "comment" },
|
||||
{ pattern = "^%*%*%*+$", type = "comment" },
|
||||
{ pattern = "^___+$", type = "comment" },
|
||||
-- bold and italic
|
||||
{ pattern = { "%*%*%*%S", "%*%*%*" }, type = "markdown_bold_italic" },
|
||||
{ pattern = { "%*%*%S", "%*%*" }, type = "markdown_bold" },
|
||||
|
@ -175,7 +175,7 @@ syntax.add {
|
|||
type = { "keyword", "function", "string", "function" }
|
||||
},
|
||||
-- headings
|
||||
{ pattern = "^#+%s.+\n", type = "keyword" },
|
||||
{ pattern = "^#+%s.+$", type = "keyword" },
|
||||
-- superscript and subscript
|
||||
{
|
||||
pattern = "%^()%d+()%^",
|
||||
|
|
|
@ -7,7 +7,7 @@ syntax.add {
|
|||
headers = "^#!.*[ /]python",
|
||||
comment = "#",
|
||||
patterns = {
|
||||
{ pattern = { "#", "\n" }, type = "comment" },
|
||||
{ pattern = "#.*$", type = "comment" },
|
||||
{ pattern = { '[ruU]?"""', '"""'; '\\' }, type = "string" },
|
||||
{ pattern = { "[ruU]?'''", "'''", '\\' }, type = "string" },
|
||||
{ pattern = { '[ruU]?"', '"', '\\' }, type = "string" },
|
||||
|
|
Loading…
Reference in New Issue