From acb60926ea76e6e57f0700b140e71c437454e40b Mon Sep 17 00:00:00 2001 From: Bruce DuPlanty Date: Mon, 29 Mar 2021 15:12:15 -0700 Subject: [PATCH 1/3] markdown heading fix and added tagging --- jrnl.nanorc | 66 +++++++++++++++++++++++++++++++++++++++++++++++++ markdown.nanorc | 12 ++++++--- 2 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 jrnl.nanorc diff --git a/jrnl.nanorc b/jrnl.nanorc new file mode 100644 index 0000000..0eb7329 --- /dev/null +++ b/jrnl.nanorc @@ -0,0 +1,66 @@ +## 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 +# color brightwhite "^#{1,6} .*" +# for jrnl files whhere MD Headings maty be embedded +color brightwhite "#{1,6} .*" + +# lists +color orange "^[[: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:]]+$" diff --git a/markdown.nanorc b/markdown.nanorc index 448a396..a290dee 100644 --- a/markdown.nanorc +++ b/markdown.nanorc @@ -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 orange "^[[: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:]]+$" \ No newline at end of file From e6b66d62f656def65d74a37059d36ba9fdb58935 Mon Sep 17 00:00:00 2001 From: Bruce DuPlanty Date: Mon, 29 Mar 2021 15:44:24 -0700 Subject: [PATCH 2/3] color fix --- jrnl.nanorc | 3 +-- markdown.nanorc | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/jrnl.nanorc b/jrnl.nanorc index 0eb7329..d642b14 100644 --- a/jrnl.nanorc +++ b/jrnl.nanorc @@ -32,12 +32,11 @@ color red "(^|[[:space:]])~~[^ ][^~]*~~" color brightmagenta "^(---+|===+|___+|\*\*\*+)\s*$" # headlines -# color brightwhite "^#{1,6} .*" # for jrnl files whhere MD Headings maty be embedded color brightwhite "#{1,6} .*" # lists -color orange "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. " +color brightblue "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. " # leading whitespace color black "^[[:space:]]+" diff --git a/markdown.nanorc b/markdown.nanorc index a290dee..c371f88 100644 --- a/markdown.nanorc +++ b/markdown.nanorc @@ -28,7 +28,7 @@ color brightmagenta "^(---+|===+|___+|\*\*\*+)\s*$" color brightwhite "^#{1,6} .*" # lists -color orange "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. " +color brightblue "^[[:space:]]*[\*+-] |^[[:space:]]*[0-9]+\. " # leading whitespace color black "^[[:space:]]+" From cdfdfd17ea9832db5c985254e5aac65ce9bd2819 Mon Sep 17 00:00:00 2001 From: Bruce <33303709+bduplanty@users.noreply.github.com> Date: Mon, 29 Mar 2021 15:59:22 -0700 Subject: [PATCH 3/3] comments Removed commented lines and adjusted heading comments --- jrnl.nanorc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jrnl.nanorc b/jrnl.nanorc index d642b14..18cb85e 100644 --- a/jrnl.nanorc +++ b/jrnl.nanorc @@ -1,15 +1,13 @@ ## Syntax highlighting for Jrnl/Markdown files. ## Original authors: Ryan Westlund and Benno Schulenberg -## Copy and modified: Bruce DuPlanty +## 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 brightgreen "(@+[a-zA-Z0-9\-\_\.\=\!\:(_)]{1,})" -#color brightgreen "(\++[a-zA-Z0-9\-\_\.\=\!\:(_)]{1,})" color brightred "#{1}[a-zA-Z0-9_!:\-\.]*" # Tables (Github extension)