aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/meta_abstraction.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2018-02-27 18:19:53 -0500
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:14 -0400
commitfb3a5d3e04970c7631253f2530693d0cf21b33db (patch)
tree4001cd446ed137c3c7ac19badbee447000c622ca /org/meta_abstraction.org
parent0.25.0 remove sdlang (headers, conf, make doc) (diff)
(header, doc make, config) add checks to toml
Diffstat (limited to 'org/meta_abstraction.org')
-rw-r--r--org/meta_abstraction.org38
1 files changed, 38 insertions, 0 deletions
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 +/
<<abs_init_rest>>
/+ abstraction init ↑ +/
+ <<make_tests>>
/+ ↓ 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