From fb3a5d3e04970c7631253f2530693d0cf21b33db Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 27 Feb 2018 18:19:53 -0500 Subject: (header, doc make, config) add checks to toml --- org/meta_abstraction.org | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'org/meta_abstraction.org') diff --git a/org/meta_abstraction.org b/org/meta_abstraction.org index a1e5a95..d112a51 100644 --- a/org/meta_abstraction.org +++ b/org/meta_abstraction.org @@ -47,6 +47,7 @@ template SiSUdocAbstraction() { /+ ↓ abstraction init +/ <> /+ abstraction init ↑ +/ + <> /+ ↓ loop markup document/text line by line +/ srcDocLoop: foreach (line; markup_sourcefile_content) { @@ -533,6 +534,33 @@ string[] html_segnames=["toc"]; int cnt1 = 1; int cnt2 = 1; int cnt3 = 1; #+END_SRC +*** make tests + +#+name: make_tests +#+BEGIN_SRC d +debug (substitutions) { + writeln(__LINE__, ":", __FILE__, ": DEBUG substitutions:"); + if (conf_make_meta.make.substitute) { + foreach(substitution_pair; conf_make_meta.make.substitute) { + writeln("regex to match: ", substitution_pair[0]); + writeln("substitution to make: ", substitution_pair[1]); + } + } + if (!(conf_make_meta.make.bold_rgxmatch == "=NULL" || conf_make_meta.make.bold_rgxmatch.empty)) { + writeln("regex to match: ", conf_make_meta.make.bold_rgxmatch); + writeln("substitution to make: ", conf_make_meta.make.bold_substitute_html); + } + if (!(conf_make_meta.make.emphasis_rgxmatch == "=NULL" || conf_make_meta.make.emphasis_rgxmatch.empty)) { + writeln("regex to match: ", conf_make_meta.make.emphasis_rgxmatch); + writeln("substitution to make: ", conf_make_meta.make.emphasis_substitute_html); + } + if (!(conf_make_meta.make.italics_rgxmatch == "=NULL" || conf_make_meta.make.italics_rgxmatch.empty)) { + writeln("regex to match: ", conf_make_meta.make.italics_rgxmatch); + writeln("substitution to make: ", conf_make_meta.make.italics_substitute_html); + } +} +#+END_SRC + ** 2. _loop: process document body_ [+6] :loop: *** loop scope :scope: @@ -2531,6 +2559,8 @@ static auto _check_ocn_status_(L,T)( } #+END_SRC +*** make substitutions + #+name: abs_functions_substitutions #+BEGIN_SRC d auto _doc_header_and_make_substitutions_(L,CMM)( @@ -2540,6 +2570,14 @@ auto _doc_header_and_make_substitutions_(L,CMM)( debug(asserts) { static assert(is(typeof(line) == char[])); } + if (conf_make_meta.make.substitute) { + foreach(substitution_pair; conf_make_meta.make.substitute) { + line = line.replaceAll( + regex(substitution_pair[0]), + substitution_pair[1] + ); + } + } if (!( conf_make_meta.make.bold_rgxmatch == "=NULL" || conf_make_meta.make.bold_rgxmatch.empty -- cgit v1.2.3