From 02b80eece8abd93f4a51df6ac2523c0d85694bad Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 4 Jul 2017 07:42:16 -0400 Subject: regex minor additions --- org/default_regex.org | 7 ++++++- src/sdp/ao/rgx.d | 7 ++++++- src/sdp/output/rgx.d | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/org/default_regex.org b/org/default_regex.org index b6173cf..04abbad 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -420,6 +420,8 @@ static insert_src_fn_ssi_or_sst = ctRegex!(`^<<\s*(?P.+?)】`, "m"); +static inline_notes_al_gen_ref = ctRegex!(`【(?P[*+]\s+)\s*(?P.+?)】`, "mg"); static inline_al_delimiter_open_regular = ctRegex!(`【\s`, "m"); static inline_al_delimiter_open_symbol_star = ctRegex!(`【[*]\s`, "m"); static inline_al_delimiter_open_symbol_plus = ctRegex!(`【[+]\s`, "m"); @@ -438,8 +440,10 @@ static inline_text_and_note_al_ = ctRegex!(`(.+?(?:【[*+] #+name: prgmkup_rgx #+BEGIN_SRC d /+ inline markup footnotes endnotes +/ -static inline_link = ctRegex!(`┥(.+?)┝┤(.+?)├`, "mg"); +static inline_link = ctRegex!(`┥(?P.+?)┝┤(?P.+?)├`, "mg"); +static inline_link_clean = ctRegex!(`┤(?:.+?)├|[┥┝]`, "mg"); static inline_a_url = ctRegex!(`(┤)(\S+?)(├)`, "mg"); +static url = ctRegex!(`https?://`, "mg"); static inline_link_subtoc = ctRegex!(`^(?P[5-7])~ ┥(?P.+?)┝┤(?P.+?)├`, "mg"); static fn_suffix = ctRegex!(`\.fnSuffix`, "mg"); static inline_link_fn_suffix = ctRegex!(`¤(.+?)(\.fnSuffix)`, "mg"); @@ -469,6 +473,7 @@ static inline_emphasis_line = ctRegex!(`^\*_ (?P static inline_bold_line = ctRegex!(`^!_ (?P.+?)((?: [\\]{2}|[~]#){0,2}$)`); static inline_italics_line = ctRegex!(`^/_ (?P.+?)((?: [\\]{2}|[~]#){0,2}$)`); static inline_underscore_line = ctRegex!(`^__ (?P.+?)((?: [\\]{2}|[~]#){0,2}$)`); +static inline_fontface_clean = ctRegex!(`[*!_/^,+#■"-]\{|\}[*!_/^,+#■"-]`, "mg"); #+END_SRC *** table related diff --git a/src/sdp/ao/rgx.d b/src/sdp/ao/rgx.d index aeab6e9..a5e7a9c 100644 --- a/src/sdp/ao/rgx.d +++ b/src/sdp/ao/rgx.d @@ -204,6 +204,8 @@ template SiSUrgxInit() { /+ inline markup footnotes endnotes +/ static inline_notes_al = ctRegex!(`【(?:[*+]\s+|\s*)(.+?)】`, "mg"); static inline_notes_al_gen = ctRegex!(`【.+?】`, "m"); + static inline_notes_al_gen_text = ctRegex!(`【(?P.+?)】`, "m"); + static inline_notes_al_gen_ref = ctRegex!(`【(?P[*+]\s+)\s*(?P.+?)】`, "mg"); static inline_al_delimiter_open_regular = ctRegex!(`【\s`, "m"); static inline_al_delimiter_open_symbol_star = ctRegex!(`【[*]\s`, "m"); static inline_al_delimiter_open_symbol_plus = ctRegex!(`【[+]\s`, "m"); @@ -216,8 +218,10 @@ template SiSUrgxInit() { static inline_text_and_note_al = ctRegex!(`(?P.+?)【(?:[*+ ]*)(?P.+?)】`, "mg"); static inline_text_and_note_al_ = ctRegex!(`(.+?(?:【[*+]*\s+.+?】|$))`, "mg"); /+ inline markup footnotes endnotes +/ - static inline_link = ctRegex!(`┥(.+?)┝┤(.+?)├`, "mg"); + static inline_link = ctRegex!(`┥(?P.+?)┝┤(?P.+?)├`, "mg"); + static inline_link_clean = ctRegex!(`┤(?:.+?)├|[┥┝]`, "mg"); static inline_a_url = ctRegex!(`(┤)(\S+?)(├)`, "mg"); + static url = ctRegex!(`https?://`, "mg"); static inline_link_subtoc = ctRegex!(`^(?P[5-7])~ ┥(?P.+?)┝┤(?P.+?)├`, "mg"); static fn_suffix = ctRegex!(`\.fnSuffix`, "mg"); static inline_link_fn_suffix = ctRegex!(`¤(.+?)(\.fnSuffix)`, "mg"); @@ -241,6 +245,7 @@ template SiSUrgxInit() { static inline_bold_line = ctRegex!(`^!_ (?P.+?)((?: [\\]{2}|[~]#){0,2}$)`); static inline_italics_line = ctRegex!(`^/_ (?P.+?)((?: [\\]{2}|[~]#){0,2}$)`); static inline_underscore_line = ctRegex!(`^__ (?P.+?)((?: [\\]{2}|[~]#){0,2}$)`); + static inline_fontface_clean = ctRegex!(`[*!_/^,+#■"-]\{|\}[*!_/^,+#■"-]`, "mg"); /+ table delimiters +/ static table_delimiter_col = ctRegex!("[ ]*[┊][ ]*", "mg"); static table_delimiter_row = ctRegex!("[ ]*\n", "mg"); diff --git a/src/sdp/output/rgx.d b/src/sdp/output/rgx.d index 4a9e33e..728e3f9 100644 --- a/src/sdp/output/rgx.d +++ b/src/sdp/output/rgx.d @@ -26,6 +26,8 @@ template SiSUoutputRgxInit() { /+ inline markup footnotes endnotes +/ static inline_notes_al = ctRegex!(`【(?:[*+]\s+|\s*)(.+?)】`, "mg"); static inline_notes_al_gen = ctRegex!(`【.+?】`, "m"); + static inline_notes_al_gen_text = ctRegex!(`【(?P.+?)】`, "m"); + static inline_notes_al_gen_ref = ctRegex!(`【(?P[*+]\s+)\s*(?P.+?)】`, "mg"); static inline_al_delimiter_open_regular = ctRegex!(`【\s`, "m"); static inline_al_delimiter_open_symbol_star = ctRegex!(`【[*]\s`, "m"); static inline_al_delimiter_open_symbol_plus = ctRegex!(`【[+]\s`, "m"); @@ -38,8 +40,10 @@ template SiSUoutputRgxInit() { static inline_text_and_note_al = ctRegex!(`(?P.+?)【(?:[*+ ]*)(?P.+?)】`, "mg"); static inline_text_and_note_al_ = ctRegex!(`(.+?(?:【[*+]*\s+.+?】|$))`, "mg"); /+ inline markup footnotes endnotes +/ - static inline_link = ctRegex!(`┥(.+?)┝┤(.+?)├`, "mg"); + static inline_link = ctRegex!(`┥(?P.+?)┝┤(?P.+?)├`, "mg"); + static inline_link_clean = ctRegex!(`┤(?:.+?)├|[┥┝]`, "mg"); static inline_a_url = ctRegex!(`(┤)(\S+?)(├)`, "mg"); + static url = ctRegex!(`https?://`, "mg"); static inline_link_subtoc = ctRegex!(`^(?P[5-7])~ ┥(?P.+?)┝┤(?P.+?)├`, "mg"); static fn_suffix = ctRegex!(`\.fnSuffix`, "mg"); static inline_link_fn_suffix = ctRegex!(`¤(.+?)(\.fnSuffix)`, "mg"); @@ -63,6 +67,7 @@ template SiSUoutputRgxInit() { static inline_bold_line = ctRegex!(`^!_ (?P.+?)((?: [\\]{2}|[~]#){0,2}$)`); static inline_italics_line = ctRegex!(`^/_ (?P.+?)((?: [\\]{2}|[~]#){0,2}$)`); static inline_underscore_line = ctRegex!(`^__ (?P.+?)((?: [\\]{2}|[~]#){0,2}$)`); + static inline_fontface_clean = ctRegex!(`[*!_/^,+#■"-]\{|\}[*!_/^,+#■"-]`, "mg"); /+ table delimiters +/ static table_delimiter_col = ctRegex!("[ ]*[┊][ ]*", "mg"); static table_delimiter_row = ctRegex!("[ ]*\n", "mg"); -- cgit v1.2.3