mirror of
https://github.com/zyedidia/micro.git
synced 2025-06-18 23:05:40 -04:00
Merge 15caa55a09
into 5eddf5b85d
This commit is contained in:
commit
12635818b5
@ -1,48 +1,108 @@
|
||||
filetype: markdown
|
||||
|
||||
detect:
|
||||
filename: "\\.(livemd|md|mkd|mkdn|markdown)$"
|
||||
|
||||
filename: \.(livemd|md|mkd|mkdn|markdown)$
|
||||
rules:
|
||||
# Tables (Github extension)
|
||||
- type: ".*[ :]\\|[ :].*"
|
||||
# Tables (Github extension)
|
||||
- type: ".*[ :]\\|[ :].*"
|
||||
|
||||
# quotes
|
||||
- statement: "^>.*"
|
||||
- statement: "^>.*"
|
||||
|
||||
# Emphasis
|
||||
- type: "(^|[[:space:]])(_[^ ][^_]*_|\\*[^ ][^*]*\\*)"
|
||||
- type: "(^|[[:space:]])(_[^ ][^_]*_|\\*[^ ][^*]*\\*)"
|
||||
|
||||
# Strong emphasis
|
||||
- type: "(^|[[:space:]])(__[^ ][^_]*__|\\*\\*[^ ][^*]*\\*\\*)"
|
||||
- type: "(^|[[:space:]])(__[^ ][^_]*__|\\*\\*[^ ][^*]*\\*\\*)"
|
||||
|
||||
# strike-through
|
||||
- type: "(^|[[:space:]])~~[^ ][^~]*~~"
|
||||
- type: "(^|[[:space:]])~~[^ ][^~]*~~"
|
||||
|
||||
# horizontal rules
|
||||
- special: "^(---+|===+|___+|\\*\\*\\*+)\\s*$"
|
||||
- special: "^(---+|===+|___+|\\*\\*\\*+)\\s*$"
|
||||
|
||||
# headlines
|
||||
- special: "^#{1,6}.*"
|
||||
- special: "^#{1,6}.*"
|
||||
|
||||
# lists
|
||||
- identifier: "^[[:space:]]*[\\*+-] |^[[:space:]]*[0-9]+\\. "
|
||||
- identifier: "^[[:space:]]*[\\*+-] |^[[:space:]]*[0-9]+\\. "
|
||||
|
||||
# misc
|
||||
- preproc: "(\\(([CcRr]|[Tt][Mm])\\)|\\.{3}|(^|[[:space:]])\\-\\-($|[[:space:]]))"
|
||||
- preproc: "(\\(([CcRr]|[Tt][Mm])\\)|\\.{3}|(^|[[:space:]])\\-\\-($|[[:space:]]))"
|
||||
|
||||
# links
|
||||
- constant: "\\[[^]]+\\]"
|
||||
- constant: "\\[([^][]|\\[[^]]*\\])*\\]\\([^)]+\\)"
|
||||
- constant: "\\[[^]]+\\]"
|
||||
- constant: "\\[([^][]|\\[[^]]*\\])*\\]\\([^)]+\\)"
|
||||
|
||||
# images
|
||||
- underlined: "!\\[[^][]*\\](\\([^)]+\\)|\\[[^]]+\\])"
|
||||
- underlined: "!\\[[^][]*\\](\\([^)]+\\)|\\[[^]]+\\])"
|
||||
|
||||
# urls
|
||||
- underlined: "https?://[^ )>]+"
|
||||
- underlined: "https?://[^ )>]+"
|
||||
|
||||
- special: "^```$"
|
||||
- special: "^```$"
|
||||
|
||||
- special:
|
||||
# Fenced code blocks for syntax highlighting
|
||||
- default:
|
||||
start: "(?i)^```(c)$"
|
||||
end: "^```$"
|
||||
rules:
|
||||
- include: "c"
|
||||
- default:
|
||||
start: "(?i)^```(c\\+\\+|cpp)$"
|
||||
end: "^```$"
|
||||
rules:
|
||||
- include: "c++"
|
||||
- default:
|
||||
start: "(?i)^```(csharp|c\\#)$"
|
||||
end: "^```$"
|
||||
rules:
|
||||
- include: "csharp"
|
||||
- default:
|
||||
start: "(?i)^```(golang|go)$"
|
||||
end: "^```$"
|
||||
rules:
|
||||
- include: "go"
|
||||
- default:
|
||||
start: "(?i)^```(java)$"
|
||||
end: "^```$"
|
||||
rules:
|
||||
- include: "java"
|
||||
- default:
|
||||
start: "(?i)^```(javascript|js)$"
|
||||
end: "^```$"
|
||||
rules:
|
||||
- include: "javascript"
|
||||
- default:
|
||||
start: "(?i)^```(php)$"
|
||||
end: "^```$"
|
||||
rules:
|
||||
- include: "php"
|
||||
- default:
|
||||
start: "(?i)^```(python3|python|py)$"
|
||||
end: "^```$"
|
||||
rules:
|
||||
- include: "python"
|
||||
- default:
|
||||
start: "(?i)^```(rust|rs)$"
|
||||
end: "^```$"
|
||||
rules:
|
||||
- include: "rust"
|
||||
- default:
|
||||
start: "(?i)^```(sh|powershell|shell|bash)$"
|
||||
end: "^```$"
|
||||
rules:
|
||||
- include: "shell"
|
||||
- default:
|
||||
start: "(?i)^```(sql)$"
|
||||
end: "^```$"
|
||||
rules:
|
||||
- include: "sql"
|
||||
- default:
|
||||
start: "(?i)^```(typescript|ts)$"
|
||||
end: "^```$"
|
||||
rules:
|
||||
- include: "typescript"
|
||||
|
||||
- special:
|
||||
start: "`"
|
||||
end: "`"
|
||||
|
Loading…
Reference in New Issue
Block a user