mirror of
https://github.com/scopatz/nanorc
synced 2025-06-20 05:30:08 +02:00
Merge cdfdfd17ea9832db5c985254e5aac65ce9bd2819 into 1aa64a86cf4c750e4d4788ef1a19d7a71ab641dd
This commit is contained in:
commit
ffcb1fef8c
63
jrnl.nanorc
Normal file
63
jrnl.nanorc
Normal file
@ -0,0 +1,63 @@
|
||||
## Syntax highlighting for Jrnl/Markdown files.
|
||||
|
||||
## Original authors: Ryan Westlund and Benno Schulenberg
|
||||
## Copied Markdown and Modified for jrnl.sh: 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 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:]]+$"
|
@ -1,5 +1,10 @@
|
||||
syntax "Markdown" "\.(md|mkd|mkdn|markdown)$"
|
||||
|
||||
# @tag +tag #tag
|
||||
color brightgreen "\+{1}[a-zA-Z0-9_!:\-\.]*"
|
||||
color brightgreen "@{1}[a-zA-Z0-9_!:\-\.]*"
|
||||
color brightred "#{1}[a-zA-Z0-9_!:\-\.]*"
|
||||
|
||||
# Tables (Github extension)
|
||||
color cyan ".*[ :]\|[ :].*"
|
||||
|
||||
@ -20,10 +25,10 @@ color red "(^|[[:space:]])~~[^ ][^~]*~~"
|
||||
color brightmagenta "^(---+|===+|___+|\*\*\*+)\s*$"
|
||||
|
||||
# headlines
|
||||
color brightmagenta "^#{1,6}.*"
|
||||
color brightwhite "^#{1,6} .*"
|
||||
|
||||
# lists
|
||||
color blue "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. "
|
||||
color brightblue "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. "
|
||||
|
||||
# leading whitespace
|
||||
color black "^[[:space:]]+"
|
||||
@ -43,9 +48,10 @@ color brightyellow "https?://[^ )>]+"
|
||||
|
||||
# code
|
||||
color yellow "`[^`]*`|^ {4}[^-+*].*"
|
||||
|
||||
# code blocks
|
||||
color yellow start="^```[^$]" end="^```$"
|
||||
color yellow "^```$"
|
||||
|
||||
## Trailing spaces
|
||||
color ,green "[[:space:]]+$"
|
||||
color ,green "[[:space:]]+$"
|
Loading…
x
Reference in New Issue
Block a user