nanorc/jrnl.nanorc
Bruce DuPlanty e6b66d62f6 color fix
2021-03-29 15:44:24 -07:00

66 lines
1.5 KiB
Plaintext

## Syntax highlighting for Jrnl/Markdown files.
## Original authors: Ryan Westlund and Benno Schulenberg
## Copy and modified: Bruce DuPlanty
## License: GPL version 3 or newer
syntax "jrnl" "\.(jrnl)$"
# @tag +tag #tag
color brightgreen "\+{1}[a-zA-Z0-9_!:\-\.]*"
color brightgreen "@{1}[a-zA-Z0-9_!:\-\.]*"
#color brightgreen "(@+[a-zA-Z0-9\-\_\.\=\!\:(_)]{1,})"
#color brightgreen "(\++[a-zA-Z0-9\-\_\.\=\!\:(_)]{1,})"
color brightred "#{1}[a-zA-Z0-9_!:\-\.]*"
# Tables (Github extension)
color cyan ".*[ :]\|[ :].*"
# quotes
color brightblack start="^>" end="^$"
color brightblack "^>.*"
# Emphasis
color green "(^|[[:space:]])(_[^ ][^_]*_|\*[^ ][^*]*\*)"
# Strong emphasis
color brightgreen "(^|[[:space:]])(__[^ ][^_]*__|\*\*[^ ][^*]*\*\*)"
# strike-through
color red "(^|[[:space:]])~~[^ ][^~]*~~"
# horizontal rules
color brightmagenta "^(---+|===+|___+|\*\*\*+)\s*$"
# headlines
# for jrnl files whhere MD Headings maty be embedded
color brightwhite "#{1,6} .*"
# lists
color brightblue "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. "
# leading whitespace
color black "^[[:space:]]+"
# misc
color magenta "\(([CcRr]|[Tt][Mm])\)" "\.{3}" "(^|[[:space:]])\-\-($|[[:space:]])"
# links
color brightblue "\[[^]]+\]"
color brightblue "\[([^][]|\[[^]]*\])*\]\([^)]+\)"
# images
color magenta "!\[[^][]*\](\([^)]+\)|\[[^]]+\])"
# urls
color brightyellow "https?://[^ )>]+"
# code
color yellow "`[^`]*`|^ {4}[^-+*].*"
# code blocks
color yellow start="^```[^$]" end="^```$"
color yellow "^```$"
# Trailing spaces
color ,green "[[:space:]]+$"