mirror of
https://github.com/cmur2/joe-syntax.git
synced 2024-12-21 16:54:23 +01:00
md: add backtick support (port)
This takes md.jsf from JOE 4.4 and applies 6b2a3be746
ontop.
This commit is contained in:
parent
8884bae2d2
commit
b54f55cff1
@ -31,6 +31,7 @@ Files with contributions (or unclear license info):
|
||||
* [ini.jsf](https://github.com/cmur2/joe-syntax/blob/master/ini.jsf) which is created by [Christian Nicolai](https://github.com/cmur2) with contributions from [Todd Lewis](https://github.com/utoddl)
|
||||
* [json.jsf](https://github.com/cmur2/joe-syntax/blob/master/json.jsf) which is entirely contributed by [Rebecca Turner](https://github.com/iarna) under GPL v2 or any later version and compatible ISC license ([comment](https://github.com/cmur2/joe-syntax/pull/14#issuecomment-78058037))
|
||||
* [lsl.jsf](https://github.com/cmur2/joe-syntax/blob/master/lsl.jsf) which is from [Zai Lynch](https://wiki.secondlife.com/wiki/User:Zai_Lynch) under GPL v1 (delivered by [Rebecca Turner](https://github.com/iarna))
|
||||
* [md.jsf](https://github.com/cmur2/joe-syntax/blob/master/md.jsf) which is created by [Christian Nicolai](https://github.com/cmur2) and then modified by Jonas Rosling and [Todd Lewis](https://github.com/utoddl)
|
||||
* [sql.jsf](https://github.com/cmur2/joe-syntax/blob/master/sql.jsf) which is from an "unknown source" (delivered by [Rebecca Turner](https://github.com/iarna))
|
||||
* [yaml.jsf](https://github.com/cmur2/joe-syntax/blob/master/yaml.jsf) which is created by [Christian Nicolai](https://github.com/cmur2) with bug fixes from [Todd Lewis](https://github.com/utoddl)
|
||||
|
||||
|
153
md.jsf
Normal file
153
md.jsf
Normal file
@ -0,0 +1,153 @@
|
||||
# JOE syntax highlight file for Markdown
|
||||
# by Christian Nicolai (http://mycrobase.de)
|
||||
|
||||
# And yes, this *is* a joke :p
|
||||
|
||||
# bold parsing is not that perfect since this works: **bold__
|
||||
|
||||
=Idle
|
||||
=Tag green
|
||||
=Escape bold
|
||||
=Bad bold red
|
||||
|
||||
=Bold bold
|
||||
=Headline bold yellow
|
||||
=Quote green
|
||||
=Code green
|
||||
=List yellow
|
||||
=LinkDesc green
|
||||
=Link blue
|
||||
=Rule inverse
|
||||
|
||||
:line_start Idle
|
||||
* idle noeat
|
||||
"#" headline_prefix recolor=-1
|
||||
">" quote recolor=-1
|
||||
" " maybe_code1
|
||||
"\t" code
|
||||
"-*" maybe_list
|
||||
|
||||
:idle Idle
|
||||
* idle
|
||||
"\n" line_start
|
||||
"<" tag recolor=-1
|
||||
"\\" escape recolor=-1
|
||||
"*_" maybe_bold1
|
||||
"[" maybe_link_desc1
|
||||
"`" backtick buffer noeat
|
||||
|
||||
:headline_prefix Idle
|
||||
* headline
|
||||
"#" headline_prefix
|
||||
|
||||
:headline Headline
|
||||
* headline
|
||||
"\n" line_start
|
||||
|
||||
:quote Quote
|
||||
* quote
|
||||
"\n" line_start
|
||||
|
||||
:maybe_code1 Idle
|
||||
* idle
|
||||
" " maybe_code2
|
||||
|
||||
:maybe_code2 Idle
|
||||
* idle
|
||||
" " maybe_code3
|
||||
|
||||
:maybe_code3 Idle
|
||||
* idle
|
||||
" " code recolor=-4
|
||||
|
||||
:code Code
|
||||
* code
|
||||
"\n" line_start
|
||||
|
||||
:maybe_list Idle
|
||||
* idle
|
||||
" " list
|
||||
"-*" maybe_rule1
|
||||
|
||||
:list List
|
||||
* list
|
||||
"\n" line_start
|
||||
|
||||
:maybe_rule1 Idle
|
||||
* idle
|
||||
"-*" rule recolor=-3
|
||||
|
||||
:rule Rule
|
||||
* rule
|
||||
"\n" line_start
|
||||
|
||||
:tag Tag
|
||||
* idle
|
||||
"a-z0-9 /" tag
|
||||
">" idle
|
||||
|
||||
# do escaping of *_ and so on
|
||||
:escape Escape
|
||||
* idle
|
||||
|
||||
:maybe_bold1 Idle
|
||||
* idle noeat
|
||||
"*_" bold recolor=-2
|
||||
|
||||
:bold Bold
|
||||
* bold
|
||||
"\n" line_start # end if we reach newline during bold
|
||||
"*_" maybe_end_bold
|
||||
|
||||
:maybe_end_bold Bold
|
||||
* bold
|
||||
"*_" end_bold
|
||||
|
||||
:end_bold Bold
|
||||
* idle noeat
|
||||
|
||||
:maybe_link_desc1 Idle
|
||||
* maybe_link_desc mark
|
||||
|
||||
:maybe_link_desc Idle
|
||||
* maybe_link_desc
|
||||
"]" maybe_end_link_desc markend
|
||||
|
||||
:maybe_end_link_desc Idle
|
||||
* idle
|
||||
"(" link_inline1 recolormark
|
||||
"[" link_ref1 recolormark
|
||||
|
||||
:link_inline1 LinkDesc
|
||||
* link_inline noeat
|
||||
|
||||
:link_inline Link
|
||||
* link_inline
|
||||
")" link_end noeat
|
||||
|
||||
:link_ref1 LinkDesc
|
||||
* link_ref noeat
|
||||
|
||||
:link_ref Link
|
||||
* link_ref
|
||||
"]" link_end noeat
|
||||
|
||||
:link_end Idle
|
||||
* idle
|
||||
|
||||
:backtick Quote
|
||||
* backtick_body save_s noeat
|
||||
"`" backtick
|
||||
|
||||
:backtick_body Code
|
||||
* backtick_body
|
||||
"`" backtick_end_maybe buffer
|
||||
|
||||
:backtick_end_maybe Code
|
||||
* backtick_body strings
|
||||
"&" backtick_end
|
||||
done
|
||||
"`" backtick_end_maybe
|
||||
|
||||
:backtick_end Quote
|
||||
* idle noeat
|
Loading…
Reference in New Issue
Block a user