From 5f6caf585c7ccaac0a4310987c85fdcfd3bcff3d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 29 Jan 2019 17:00:31 -0500 Subject: =?UTF-8?q?format=20delimiter=20s/=C2=B6/=E2=94=8B/g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/doc_reform/meta/metadoc_from_src.d | 10 +++------- src/doc_reform/meta/rgx.d | 3 ++- 2 files changed, 5 insertions(+), 8 deletions(-) (limited to 'src/doc_reform/meta') diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d index 5df5e87..2dfd746 100644 --- a/src/doc_reform/meta/metadoc_from_src.d +++ b/src/doc_reform/meta/metadoc_from_src.d @@ -712,13 +712,9 @@ template DocReformDocAbstraction() { /+ within block object: block +/ line = line._doc_header_and_make_substitutions_(conf_make_meta); line = line._doc_header_and_make_substitutions_fontface_(conf_make_meta); - if (auto m = line.match(rgx.spaces_line_start)) { + if (auto m = line.match(rgx.spaces_keep)) { line = line - .replaceAll(rgx.spaces_line_start, (m.captures[1]).translate([ ' ' : mkup.nbsp ])); - } - if (auto m = line.match(rgx.spaces_multiple)) { - line = line - .replaceAll(rgx.spaces_multiple, (m.captures[1]).translate([ ' ' : mkup.nbsp ])); + .replaceAll(rgx.spaces_keep, (m.captures[1]).translate([ ' ' : mkup.nbsp ])); } line._block_block_(an_object, obj_type_status); continue; @@ -1743,7 +1739,7 @@ template DocReformDocAbstraction() { obj.stow.link ~= obj.text.matchFirst(rgx.inline_link_stow_uri)[2]; obj.text = obj.text.replaceFirst( rgx.inline_link_stow_uri, - format(q"¶┥%s┝┤%s├¶", "$1", i) + format(q"┋┥%s┝┤%s├┋", "$1", i) ); } } diff --git a/src/doc_reform/meta/rgx.d b/src/doc_reform/meta/rgx.d index dcfc245..df294e8 100644 --- a/src/doc_reform/meta/rgx.d +++ b/src/doc_reform/meta/rgx.d @@ -200,6 +200,7 @@ static template DocReformRgxInit() { static newline = ctRegex!("\n", "mg"); static strip_br = ctRegex!("^
\n|
\n*$"); static space = ctRegex!(`[ ]`, "mg"); + static spaces_keep = ctRegex!(`(?P^[ ]+|[ ]{2,})`, "mg"); // code, verse, block static spaces_line_start = ctRegex!(`^(?P[ ]+)`, "mg"); static spaces_multiple = ctRegex!(`(?P[ ]{2,})`, "mg"); static two_spaces = ctRegex!(`[ ]{2}`, "mg"); @@ -269,7 +270,7 @@ static template DocReformRgxInit() { static inline_seg_link = ctRegex!(`(¤)(?:.+?)\.fnSuffix`, "mg"); static mark_internal_site_lnk = ctRegex!(`¤`, "mg"); static quotation_mark_sql_insert_delimiter = ctRegex!("[']", "mg"); - static quotation_mark_various = ctRegex!(q"¶['‘’“”"`´¨]¶", "mg"); + static quotation_mark_various = ctRegex!(q"┋['‘’“”"`´¨]┋", "mg"); /+ inline markup font face mod +/ static inline_faces = ctRegex!(`(?P(?P[*!_^,+#-])\{(?P.+?)\}[*!_^,+#-])`, "mg"); static inline_emphasis = ctRegex!(`\*\{(?P.+?)\}\*`, "mg"); -- cgit v1.2.3