aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/doc_reform/output/rgx.d
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2019-01-31 14:25:38 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2019-05-17 16:59:38 -0400
commit68395fa1d5bd40d187e704ff570565e5335ade58 (patch)
tree59d1585d96c6e4c3c46574bf7112e496d0c3a3ee /src/doc_reform/output/rgx.d
parentparallel & serial processing logic (diff)
inline fontface markup, internal representation
Diffstat (limited to 'src/doc_reform/output/rgx.d')
-rw-r--r--src/doc_reform/output/rgx.d40
1 files changed, 27 insertions, 13 deletions
diff --git a/src/doc_reform/output/rgx.d b/src/doc_reform/output/rgx.d
index 0483f1b..354de00 100644
--- a/src/doc_reform/output/rgx.d
+++ b/src/doc_reform/output/rgx.d
@@ -80,25 +80,39 @@ static template DocReformOutputRgxInit() {
static quotation_mark_sql_insert_delimiter = ctRegex!("[']", "mg");
static quotation_mark_various = ctRegex!(q"┋['‘’“”"`´¨]┋", "mg");
/+ inline markup font face mod +/
- static inline_faces = ctRegex!(`(?P<markup>(?P<mod>[*!_^,+#-])\{(?P<text>.+?)\}[*!_^,+#-])`, "mg");
- static inline_emphasis = ctRegex!(`\*\{(?P<text>.+?)\}\*`, "mg");
- static inline_bold = ctRegex!(`!\{(?P<text>.+?)\}!`, "mg");
- static inline_underscore = ctRegex!(`_\{(?P<text>.+?)\}_`, "mg");
- static inline_italics = ctRegex!(`/\{(?P<text>.+?)\}/`, "mg");
- static inline_superscript = ctRegex!(`\^\{(?P<text>.+?)\}\^`, "mg");
- static inline_subscript = ctRegex!(`,\{(?P<text>.+?)\},`, "mg");
- static inline_strike = ctRegex!(`-\{(?P<text>.+?)\}-`, "mg");
- static inline_insert = ctRegex!(`\+\{(?P<text>.+?)\}\+`, "mg");
- static inline_mono = ctRegex!(`#\{(?P<text>.+?)\}#`, "mg");
- static inline_mono_box = ctRegex!(`■\{(?P<text>.+?)\}■`, "mg");
- static inline_cite = ctRegex!(`"\{(?P<text>.+?)\}"`, "mg");
+ static inline_mark_faces = ctRegex!(`(?P<markup>(?P<mod>[*!/_^,+#"-])\{(?P<text>.+?)\}[*!/_^,+#"-])`, "mg");
+ static inline_mark_faces_to_mod = ctRegex!(`(?P<mod>[*!/_^,+#"-])\{(?P<text>.+?)\}([*!/_^,+#"-])`, "mg");
+ static inline_mark_emphasis = ctRegex!(`([*])\{(?P<text>.+?)\}[*]`, "mg");
+ static inline_mark_bold = ctRegex!(`([!])\{(?P<text>.+?)\}[!]`, "mg");
+ static inline_mark_underscore = ctRegex!(`([_])\{(?P<text>.+?)\}[_]`, "mg");
+ static inline_mark_italics = ctRegex!(`([/])\{(?P<text>.+?)\}[/]`, "mg");
+ static inline_mark_superscript = ctRegex!(`(\^)\{(?P<text>.+?)\}\^`, "mg");
+ static inline_mark_subscript = ctRegex!(`([,])\{(?P<text>.+?)\}[,]`, "mg");
+ static inline_mark_strike = ctRegex!(`([-])\{(?P<text>.+?)\}[-]`, "mg");
+ static inline_mark_insert = ctRegex!(`([+])\{(?P<text>.+?)\}[+]`, "mg");
+ static inline_mark_mono = ctRegex!(`([#])\{(?P<text>.+?)\}[#]`, "mg");
+ static inline_mark_cite = ctRegex!(`(["])\{(?P<text>.+?)\}["]`, "mg");
+ static inline_mark_fontface_clean = ctRegex!(`[*!_/^,+#■"-]\{|\}[*!_/^,+#■"-]`, "mg");
static inline_faces_line = ctRegex!(`^[*!/_]_ (?P<text>.+?)((?: [\\]{2}|[~]#){0,2}$)`);
static inline_emphasis_line = ctRegex!(`^\*_ (?P<text>.+?)(?P<tail>(?: [\\]{2}|[~]#){0,2}$)`);
static inline_bold_line = ctRegex!(`^!_ (?P<text>.+?)(?P<tail>(?: [\\]{2}|[~]#){0,2}$)`);
static inline_italics_line = ctRegex!(`^/_ (?P<text>.+?)(?P<tail>(?: [\\]{2}|[~]#){0,2}$)`);
static inline_underscore_line = ctRegex!(`^__ (?P<text>.+?)(?P<tail>(?: [\\]{2}|[~]#){0,2}$)`);
- static inline_fontface_clean = ctRegex!(`[*!_/^,+#■"-]\{|\}[*!_/^,+#■"-]`, "mg");
static no_header_rgx = ctRegex!(`^=NULL$`);
+ /+ inline markup font face mod +/
+ static inline_faces = ctRegex!(`(?P<markup>(?P<mod>[*!_^,+■‖-])┨(?P<text>.+?)┣[*!_^,+■‖-])`, "mg");
+ static inline_emphasis = ctRegex!(`[*]┨(?P<text>.+?)┣[*]`, "mg");
+ static inline_bold = ctRegex!(`[!]┨(?P<text>.+?)┣[!]`, "mg");
+ static inline_underscore = ctRegex!(`[_]┨(?P<text>.+?)┣[_]`, "mg");
+ static inline_italics = ctRegex!(`[/]┨(?P<text>.+?)┣[/]`, "mg");
+ static inline_superscript = ctRegex!(`\^┨(?P<text>.+?)┣\^`, "mg");
+ // static inline_superscript = ctRegex!(`[\^]┨(?P<text>.+?)┣[\^]`, "mg");
+ static inline_subscript = ctRegex!(`[,]┨(?P<text>.+?)┣[,]`, "mg");
+ static inline_strike = ctRegex!(`[-]┨(?P<text>.+?)┣[-]`, "mg");
+ static inline_insert = ctRegex!(`[+]┨(?P<text>.+?)┣[+]`, "mg");
+ static inline_mono = ctRegex!(`[■]┨(?P<text>.+?)┣[■]`, "mg");
+ static inline_cite = ctRegex!(`[‖]┨(?P<text>.+?)┣[‖]`, "mg");
+ static inline_fontface_clean = ctRegex!(`[*!_/^,+■‖-]┨|┣[*!_/^,+■‖-]`, "mg");
/+ table delimiters +/
static table_delimiter_col = ctRegex!("[ ]*[┊][ ]*", "mg");
static table_delimiter_row = ctRegex!("[ ]*\n", "mg");