plugins language_md: fixed some regressions, added caddyfile support
This commit is contained in:
parent
ba0a454c97
commit
a65a2b293a
|
@ -112,6 +112,7 @@ syntax.add {
|
||||||
{ pattern = { "%$%$", "%$%$", "\\" }, type = "string", syntax = ".tex"},
|
{ pattern = { "%$%$", "%$%$", "\\" }, type = "string", syntax = ".tex"},
|
||||||
{ regex = { "\\$", [[\$|(?=\\*\n)]], "\\" }, type = "string", syntax = ".tex"},
|
{ regex = { "\\$", [[\$|(?=\\*\n)]], "\\" }, type = "string", syntax = ".tex"},
|
||||||
-- code blocks
|
-- code blocks
|
||||||
|
{ pattern = { "```caddyfile", "```" }, type = "string", syntax = "Caddyfile" },
|
||||||
{ pattern = { "```c++", "```" }, type = "string", syntax = ".cpp" },
|
{ pattern = { "```c++", "```" }, type = "string", syntax = ".cpp" },
|
||||||
{ pattern = { "```cpp", "```" }, type = "string", syntax = ".cpp" },
|
{ pattern = { "```cpp", "```" }, type = "string", syntax = ".cpp" },
|
||||||
{ pattern = { "```python", "```" }, type = "string", syntax = ".py" },
|
{ pattern = { "```python", "```" }, type = "string", syntax = ".py" },
|
||||||
|
@ -149,14 +150,15 @@ syntax.add {
|
||||||
{ pattern = { "```", "```" }, type = "string" },
|
{ pattern = { "```", "```" }, type = "string" },
|
||||||
{ pattern = { "``", "``" }, type = "string" },
|
{ pattern = { "``", "``" }, type = "string" },
|
||||||
{ pattern = { "%f[\\`]%`[%S]", "`" }, type = "string" },
|
{ pattern = { "%f[\\`]%`[%S]", "`" }, type = "string" },
|
||||||
|
-- lines
|
||||||
|
{ pattern = "^%-%-%-+\n" , type = "comment" },
|
||||||
|
{ pattern = "^%*%*%*+\n", type = "comment" },
|
||||||
|
{ pattern = "^___+\n", type = "comment" },
|
||||||
|
{ pattern = "^===+\n", type = "comment" },
|
||||||
-- strike
|
-- strike
|
||||||
{ pattern = { "~~", "~~" }, type = "keyword2" },
|
{ pattern = { "~~", "~~" }, type = "keyword2" },
|
||||||
-- highlight
|
-- highlight
|
||||||
{ pattern = { "==", "==" }, type = "literal" },
|
{ pattern = { "==", "==" }, type = "literal" },
|
||||||
-- lines
|
|
||||||
{ pattern = "^%-%-%-+$" , type = "comment" },
|
|
||||||
{ pattern = "^%*%*%*+$", type = "comment" },
|
|
||||||
{ pattern = "^___+$", type = "comment" },
|
|
||||||
-- bold and italic
|
-- bold and italic
|
||||||
{ pattern = { "%*%*%*%S", "%*%*%*" }, type = "markdown_bold_italic" },
|
{ pattern = { "%*%*%*%S", "%*%*%*" }, type = "markdown_bold_italic" },
|
||||||
{ pattern = { "%*%*%S", "%*%*" }, type = "markdown_bold" },
|
{ pattern = { "%*%*%S", "%*%*" }, type = "markdown_bold" },
|
||||||
|
@ -175,7 +177,7 @@ syntax.add {
|
||||||
type = { "keyword", "function", "string", "function" }
|
type = { "keyword", "function", "string", "function" }
|
||||||
},
|
},
|
||||||
-- headings
|
-- headings
|
||||||
{ pattern = "^#+%s.+$", type = "keyword" },
|
{ pattern = "^#+%s.+\n", type = "keyword" },
|
||||||
-- superscript and subscript
|
-- superscript and subscript
|
||||||
{
|
{
|
||||||
pattern = "%^()%d+()%^",
|
pattern = "%^()%d+()%^",
|
||||||
|
|
Loading…
Reference in New Issue