From 68395fa1d5bd40d187e704ff570565e5335ade58 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Thu, 31 Jan 2019 14:25:38 -0500 Subject: inline fontface markup, internal representation --- org/default_regex.org | 48 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 13 deletions(-) (limited to 'org/default_regex.org') diff --git a/org/default_regex.org b/org/default_regex.org index 80e3cde..2af9ed2 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -526,27 +526,49 @@ static quotation_mark_various = ctRegex!(q"┋['‘’ #+name: prgmkup_rgx #+BEGIN_SRC d /+ inline markup font face mod +/ -static inline_faces = ctRegex!(`(?P(?P[*!_^,+#-])\{(?P.+?)\}[*!_^,+#-])`, "mg"); -static inline_emphasis = ctRegex!(`\*\{(?P.+?)\}\*`, "mg"); -static inline_bold = ctRegex!(`!\{(?P.+?)\}!`, "mg"); -static inline_underscore = ctRegex!(`_\{(?P.+?)\}_`, "mg"); -static inline_italics = ctRegex!(`/\{(?P.+?)\}/`, "mg"); -static inline_superscript = ctRegex!(`\^\{(?P.+?)\}\^`, "mg"); -static inline_subscript = ctRegex!(`,\{(?P.+?)\},`, "mg"); -static inline_strike = ctRegex!(`-\{(?P.+?)\}-`, "mg"); -static inline_insert = ctRegex!(`\+\{(?P.+?)\}\+`, "mg"); -static inline_mono = ctRegex!(`#\{(?P.+?)\}#`, "mg"); -static inline_mono_box = ctRegex!(`■\{(?P.+?)\}■`, "mg"); -static inline_cite = ctRegex!(`"\{(?P.+?)\}"`, "mg"); +static inline_mark_faces = ctRegex!(`(?P(?P[*!/_^,+#"-])\{(?P.+?)\}[*!/_^,+#"-])`, "mg"); +static inline_mark_faces_to_mod = ctRegex!(`(?P[*!/_^,+#"-])\{(?P.+?)\}([*!/_^,+#"-])`, "mg"); +static inline_mark_emphasis = ctRegex!(`([*])\{(?P.+?)\}[*]`, "mg"); +static inline_mark_bold = ctRegex!(`([!])\{(?P.+?)\}[!]`, "mg"); +static inline_mark_underscore = ctRegex!(`([_])\{(?P.+?)\}[_]`, "mg"); +static inline_mark_italics = ctRegex!(`([/])\{(?P.+?)\}[/]`, "mg"); +static inline_mark_superscript = ctRegex!(`(\^)\{(?P.+?)\}\^`, "mg"); +static inline_mark_subscript = ctRegex!(`([,])\{(?P.+?)\}[,]`, "mg"); +static inline_mark_strike = ctRegex!(`([-])\{(?P.+?)\}[-]`, "mg"); +static inline_mark_insert = ctRegex!(`([+])\{(?P.+?)\}[+]`, "mg"); +static inline_mark_mono = ctRegex!(`([#])\{(?P.+?)\}[#]`, "mg"); +static inline_mark_cite = ctRegex!(`(["])\{(?P.+?)\}["]`, "mg"); +static inline_mark_fontface_clean = ctRegex!(`[*!_/^,+#■"-]\{|\}[*!_/^,+#■"-]`, "mg"); +#+END_SRC + +#+name: prgmkup_rgx +#+BEGIN_SRC d static inline_faces_line = ctRegex!(`^[*!/_]_ (?P.+?)((?: [\\]{2}|[~]#){0,2}$)`); static inline_emphasis_line = ctRegex!(`^\*_ (?P.+?)(?P(?: [\\]{2}|[~]#){0,2}$)`); static inline_bold_line = ctRegex!(`^!_ (?P.+?)(?P(?: [\\]{2}|[~]#){0,2}$)`); static inline_italics_line = ctRegex!(`^/_ (?P.+?)(?P(?: [\\]{2}|[~]#){0,2}$)`); static inline_underscore_line = ctRegex!(`^__ (?P.+?)(?P(?: [\\]{2}|[~]#){0,2}$)`); -static inline_fontface_clean = ctRegex!(`[*!_/^,+#■"-]\{|\}[*!_/^,+#■"-]`, "mg"); static no_header_rgx = ctRegex!(`^=NULL$`); #+END_SRC +#+name: prgmkup_rgx +#+BEGIN_SRC d +/+ inline markup font face mod +/ +static inline_faces = ctRegex!(`(?P(?P[*!_^,+■‖-])┨(?P.+?)┣[*!_^,+■‖-])`, "mg"); +static inline_emphasis = ctRegex!(`[*]┨(?P.+?)┣[*]`, "mg"); +static inline_bold = ctRegex!(`[!]┨(?P.+?)┣[!]`, "mg"); +static inline_underscore = ctRegex!(`[_]┨(?P.+?)┣[_]`, "mg"); +static inline_italics = ctRegex!(`[/]┨(?P.+?)┣[/]`, "mg"); +static inline_superscript = ctRegex!(`\^┨(?P.+?)┣\^`, "mg"); +// static inline_superscript = ctRegex!(`[\^]┨(?P.+?)┣[\^]`, "mg"); +static inline_subscript = ctRegex!(`[,]┨(?P.+?)┣[,]`, "mg"); +static inline_strike = ctRegex!(`[-]┨(?P.+?)┣[-]`, "mg"); +static inline_insert = ctRegex!(`[+]┨(?P.+?)┣[+]`, "mg"); +static inline_mono = ctRegex!(`[■]┨(?P.+?)┣[■]`, "mg"); +static inline_cite = ctRegex!(`[‖]┨(?P.+?)┣[‖]`, "mg"); +static inline_fontface_clean = ctRegex!(`[*!_/^,+■‖-]┨|┣[*!_/^,+■‖-]`, "mg"); +#+END_SRC + *** table related #+name: prgmkup_rgx -- cgit v1.2.3