diff options
| author | NCarrezDev <n.carrez.dev@gmail.com> | 2022-07-06 10:15:44 +0200 |
|---|---|---|
| committer | NCarrezDev <n.carrez.dev@gmail.com> | 2022-07-06 10:15:44 +0200 |
| commit | 030dcc1e62ff235271ee2dd84f07313a2bbf9574 (patch) | |
| tree | 8c1f1bb9f64b1424235adf682b31830d0cdf9b0b /data/plugins | |
| parent | e646f2fb28b24bae5d13994b14b75252718a6ccd (diff) | |
| download | lite-xl-030dcc1e62ff235271ee2dd84f07313a2bbf9574.tar.gz lite-xl-030dcc1e62ff235271ee2dd84f07313a2bbf9574.zip | |
[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
Diffstat (limited to 'data/plugins')
| -rw-r--r-- | data/plugins/language_c.lua | 6 | ||||
| -rw-r--r-- | data/plugins/language_cpp.lua | 2 | ||||
| -rw-r--r-- | data/plugins/language_css.lua | 2 | ||||
| -rw-r--r-- | data/plugins/language_html.lua | 2 | ||||
| -rw-r--r-- | data/plugins/language_js.lua | 2 | ||||
| -rw-r--r-- | data/plugins/language_lua.lua | 2 | ||||
| -rw-r--r-- | data/plugins/language_md.lua | 10 | ||||
| -rw-r--r-- | data/plugins/language_python.lua | 2 |
8 files changed, 14 insertions, 14 deletions
diff --git a/data/plugins/language_c.lua b/data/plugins/language_c.lua index f3154ed3..e644c90e 100644 --- a/data/plugins/language_c.lua +++ b/data/plugins/language_c.lua @@ -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" }, @@ -61,11 +61,11 @@ syntax.add { { pattern = "_?%u[%u_][%u%d_]*%f[%s%+%*%-%.%)%]}%?%^%%=/<>~|&;:,!]", type = "number" }, - -- Magic constants + -- Magic constants { pattern = "__[%u%l]+__", type = "number" }, -- all other functions { pattern = "[%a_][%w_]*%f[(]", type = "function" }, - -- Macros + -- Macros { pattern = "^%s*#%s*define%s+()[%a_][%a%d_]*", type = { "keyword", "symbol" } }, diff --git a/data/plugins/language_cpp.lua b/data/plugins/language_cpp.lua index c10f593a..c007a64d 100644 --- a/data/plugins/language_cpp.lua +++ b/data/plugins/language_cpp.lua @@ -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" }, diff --git a/data/plugins/language_css.lua b/data/plugins/language_css.lua index 722b9adc..fa69ac8f 100644 --- a/data/plugins/language_css.lua +++ b/data/plugins/language_css.lua @@ -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" }, diff --git a/data/plugins/language_html.lua b/data/plugins/language_html.lua index 0d61819e..6da1b45f 100644 --- a/data/plugins/language_html.lua +++ b/data/plugins/language_html.lua @@ -3,7 +3,7 @@ local syntax = require "core.syntax" syntax.add { name = "HTML", - files = { "%.html?$" }, + files = { "%.html?$" }, block_comment = { "<!--", "-->" }, patterns = { { diff --git a/data/plugins/language_js.lua b/data/plugins/language_js.lua index b811b026..3ea7a805 100644 --- a/data/plugins/language_js.lua +++ b/data/plugins/language_js.lua @@ -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" }, diff --git a/data/plugins/language_lua.lua b/data/plugins/language_lua.lua index 01403ad3..193f344b 100644 --- a/data/plugins/language_lua.lua +++ b/data/plugins/language_lua.lua @@ -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" }, diff --git a/data/plugins/language_md.lua b/data/plugins/language_md.lua index b79202db..f40821ce 100644 --- a/data/plugins/language_md.lua +++ b/data/plugins/language_md.lua @@ -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+()%^", diff --git a/data/plugins/language_python.lua b/data/plugins/language_python.lua index 4802430c..f66130c5 100644 --- a/data/plugins/language_python.lua +++ b/data/plugins/language_python.lua @@ -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" }, |
