diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2019-02-11 16:34:54 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2019-05-17 16:59:38 -0400 |
commit | 54c662aed1b2b004aeffe3d250a9dbd705897bb4 (patch) | |
tree | 0d02c0ddb99741bb2ec8ad473bfb83b3d5965ac0 /src/doc_reform/output/rgx.d | |
parent | inline fontface markup, internal representation, reorganise code (diff) |
metaverse single line munging tuningdoc-reform_v0.4.3
Diffstat (limited to 'src/doc_reform/output/rgx.d')
-rw-r--r-- | src/doc_reform/output/rgx.d | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/doc_reform/output/rgx.d b/src/doc_reform/output/rgx.d index 354de00..bf1d766 100644 --- a/src/doc_reform/output/rgx.d +++ b/src/doc_reform/output/rgx.d @@ -62,10 +62,13 @@ static template DocReformOutputRgxInit() { static inline_text_and_note_al = ctRegex!(`(?P<text>.+?)【(?:[*+ ]*)(?P<note>.+?)】`, "mg"); static inline_text_and_note_al_ = ctRegex!(`(.+?(?:【[*+]*\s+.+?】|$))`, "mg"); /+ inline markup footnotes endnotes +/ - static inline_image = ctRegex!(`(?P<pre>┥)☼(?P<imginf>(?P<img>\S+?\.(?:jpg|gif|png)),w(?P<width>\d+)h(?P<height>\d+))\s*(?P<post>.*?┝┤.+?├)`, "mg"); - static inline_image_without_dimensions = ctRegex!(`(?P<pre>┥)☼(?P<imginf>(?P<img>\S+?\.(?:jpg|gif|png)),w(?P<width>0)h(?P<height>0))\s*(?P<post>.*?┝┤.+?├)`, "mg"); - static inline_link_anchor = ctRegex!(`┋(?P<anchor>\S+?)┋`, "mg"); + static inline_image = ctRegex!(`(?P<pre>┥)☼(?P<imginf>(?P<img>\S+?\.(?:jpg|gif|png)),w(?P<width>\d+)h(?P<height>\d+))\s*(?P<post>.*?┝┤.*?├)`, "mg"); + static inline_image_without_dimensions = ctRegex!(`(?P<pre>┥)☼(?P<imginf>(?P<img>\S+?\.(?:jpg|gif|png)),w(?P<width>0)h(?P<height>0))\s*(?P<post>.*?┝┤.*?├)`, "mg"); + static inline_link_anchor = ctRegex!(`┋(?P<anchor>\S+?)┋`, "mg"); // TODO *~text_link_anchor + static inline_link_ = ctRegex!(`┥(?P<text>.+?)┝┤(?P<link>.+?)├`, "mg"); static inline_link = ctRegex!(`┥(?P<text>.+?)┝┤(?P<link>\S+?)├`, "mg"); + static inline_link_empty = ctRegex!(`┥(?P<text>.+?)┝┤├`, "mg"); + static inline_link_number = ctRegex!(`┥(?P<text>.+?)┝┤(?P<num>[0-9]+)├`, "mg"); // not used static inline_link_number_only = ctRegex!(`(┥.+?┝)┤(?P<num>[0-9]+)├`, "mg"); static inline_link_stow_uri = ctRegex!(`┥(?P<text>.+?)┝┤(?P<link>[^ 0-9#┥┝┤├][^ 0-9┥┝┤├]+)├`, "mg"); // will not stow (stowed links) or object number internal links static inline_link_hash = ctRegex!(`┥(?P<text>.+?)┝┤(?P<link>#(?P<segname>\S+?))├`, "mg"); @@ -116,10 +119,10 @@ static template DocReformOutputRgxInit() { /+ table delimiters +/ static table_delimiter_col = ctRegex!("[ ]*[┊][ ]*", "mg"); static table_delimiter_row = ctRegex!("[ ]*\n", "mg"); - static xhtml_ampersand = ctRegex!(`[&]`); // & - static xhtml_quotation = ctRegex!(`["]`); // " - static xhtml_less_than = ctRegex!(`[<]`); // < - static xhtml_greater_than = ctRegex!(`[>]`); // > - static xhtml_line_break = ctRegex!(` [\\]{2}`); // <br /> + static xhtml_ampersand = ctRegex!(`[&]`, "m"); // & + static xhtml_quotation = ctRegex!(`["]`, "m"); // " + static xhtml_less_than = ctRegex!(`[<]`, "m"); // < + static xhtml_greater_than = ctRegex!(`[>]`, "m"); // > + static xhtml_line_break = ctRegex!(` [\\]{2}`, "m"); // <br /> } } |