aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/ao_conf_make_meta.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/ao_conf_make_meta.org')
-rw-r--r--org/ao_conf_make_meta.org54
1 files changed, 26 insertions, 28 deletions
diff --git a/org/ao_conf_make_meta.org b/org/ao_conf_make_meta.org
index 398b369..30e16a0 100644
--- a/org/ao_conf_make_meta.org
+++ b/org/ao_conf_make_meta.org
@@ -54,7 +54,7 @@ template SiSUheaderExtractHub() {
}
auto head_native = HeaderDocMetadataAndMakeNativeToAA();
auto head_sdlang = HeaderExtractSDL();
- auto header_make_and_meta_tuple = (match(header_src, rgx.native_header_meta_title))
+ auto header_make_and_meta_tuple = (header_src.match(rgx.native_header_meta_title))
? (head_native.headerNativeToAA(header_src))
: (head_sdlang.headerSDLangToAA(header_src, conf_doc_make_aa));
static assert(!isTypeTuple!(header_make_and_meta_tuple));
@@ -320,7 +320,7 @@ private auto headerSDLangGet(Hs)(Hs src_header) {
static assert(is(typeof(src_header) == char[]));
}
char[][] source_header_arr =
- split(cast(char[]) src_header, rgx.newline_eol_delimiter);
+ (cast(char[]) src_header).split(rgx.newline_eol_delimiter);
char[] header_clean;
// TODO
foreach(header_line; source_header_arr) {
@@ -373,9 +373,9 @@ private auto headerSDLangToAAmake(Tag,Ma)(Tag header_sdlang, Ma dochead_make) {
}
dochead_meta["creator"]["author_raw"] = dochead_meta["creator"]["author"];
string[] authors_arr;
- auto authors_raw_arr = split(dochead_meta["creator"]["author"], rgx.arr_delimiter);
+ auto authors_raw_arr = dochead_meta["creator"]["author"].split(rgx.arr_delimiter);
foreach (author_raw; authors_raw_arr) {
- authors_arr ~= (author_raw).replace(rgx.raw_author_munge, "$2 $1");
+ authors_arr ~= author_raw.replace(rgx.raw_author_munge, "$2 $1");
}
dochead_meta["creator"]["author"] = join(authors_arr, ", ").chomp.chomp;
auto t = tuple(dochead_make, dochead_meta);
@@ -454,15 +454,13 @@ body {
destroy(dochead_meta);
destroy(dochead_make);
}
- if (auto t = match(header, rgx.native_header_main)) {
- char[][] header_obj_spl = split(
- cast(char[]) header,
- rgx.line_delimiter_ws_strip
- );
+ if (auto t = header.match(rgx.native_header_main)) {
+ char[][] header_obj_spl =
+ (cast(char[]) header).split(rgx.line_delimiter_ws_strip);
auto hm = to!string(t.captures[1]);
- if (match(hm, rgx.main_headers)) {
+ if (hm.match(rgx.main_headers)) {
foreach (line; header_obj_spl) {
- if (auto m = match(line, rgx.native_header_main)) {
+ if (auto m = line.match(rgx.native_header_main)) {
if (!empty(m.captures[2])) {
if (hm == "creator") {
dochead_meta[hm]["author"] =
@@ -482,7 +480,7 @@ body {
&& (dochead_make[hm])) {
switch (hm) {
case "make":
- if (match(hs, rgx.native_subhead_make)) {
+ if (hs.match(rgx.native_subhead_make)) {
if (dochead_make[hm][hs]) {
dochead_make[hm][hs] = to!string(s.captures[2]);
}
@@ -498,7 +496,7 @@ body {
} else if (dochead_meta[hm]) {
switch (hm) {
case "creator":
- if (match(hs, rgx.native_subhead_creator)) {
+ if (hs.match(rgx.native_subhead_creator)) {
if (dochead_meta[hm][hs]) {
dochead_meta[hm][hs] =
to!string(s.captures[2]);
@@ -510,7 +508,7 @@ body {
}
break;
case "title":
- if (match(hs, rgx.native_subhead_title)) {
+ if (hs.match(rgx.native_subhead_title)) {
if ((hs == "subtitle")
&& (dochead_meta[hm]["sub"])) {
dochead_meta[hm]["sub"] =
@@ -526,7 +524,7 @@ body {
}
break;
case "rights":
- if (match(hs, rgx.native_subhead_rights)) {
+ if (hs.match(rgx.native_subhead_rights)) {
if (dochead_meta[hm][hs]) {
dochead_meta[hm][hs] =
to!string(s.captures[2]);
@@ -538,7 +536,7 @@ body {
}
break;
case "date":
- if (match(hs, rgx.native_subhead_date)) {
+ if (hs.match(rgx.native_subhead_date)) {
if (dochead_meta[hm][hs]) {
dochead_meta[hm][hs] =
to!string(s.captures[2]);
@@ -550,7 +548,7 @@ body {
}
break;
case "original":
- if (match(hs, rgx.native_subhead_original)) {
+ if (hs.match(rgx.native_subhead_original)) {
if (dochead_meta[hm][hs]) {
dochead_meta[hm][hs] =
to!string(s.captures[2]);
@@ -562,7 +560,7 @@ body {
}
break;
case "classify":
- if (match(hs, rgx.native_subhead_classify)) {
+ if (hs.match(rgx.native_subhead_classify)) {
if (dochead_meta[hm][hs]) {
dochead_meta[hm][hs] =
to!string(s.captures[2]);
@@ -574,7 +572,7 @@ body {
}
break;
case "identifier":
- if (match(hs, rgx.native_subhead_identifier)) {
+ if (hs.match(rgx.native_subhead_identifier)) {
if (dochead_meta[hm][hs]) {
dochead_meta[hm][hs] =
to!string(s.captures[2]);
@@ -586,7 +584,7 @@ body {
}
break;
case "notes":
- if (match(hs, rgx.native_subhead_notes)) {
+ if (hs.match(rgx.native_subhead_notes)) {
if (dochead_meta[hm][hs]) {
dochead_meta[hm][hs] =
to!string(s.captures[2]);
@@ -598,7 +596,7 @@ body {
}
break;
case "publisher":
- if (match(hs, rgx.native_subhead_publisher)) {
+ if (hs.match(rgx.native_subhead_publisher)) {
if (dochead_meta[hm][hs]) {
dochead_meta[hm][hs] =
to!string(s.captures[2]);
@@ -646,14 +644,14 @@ private auto native_header_extract(L,Lo,O,T)(
static assert(is(typeof(an_object) == string[string]));
static assert(is(typeof(type) == int[string]));
}
- if (matchFirst(line, rgx.native_header_make)) { /+ matched header_make +/
+ if (line.matchFirst(rgx.native_header_make)) { /+ matched header_make +/
debug(header1) { /+ writeln(line); +/ }
type["header"] = State.on;
type["header_make"] = State.on;
type["header_meta"] = State.off;
++line_occur["header_make"];
an_object["body_nugget"] ~= line ~= "\n";
- } else if (matchFirst(line, rgx.native_header)) { /+ matched header_metadata +/
+ } else if (line.matchFirst(rgx.native_header)) { /+ matched header_metadata +/
/+ (generic header match and not previously caught by header_make) +/
debug(header1) { /+ writeln(line); +/ }
type["header"] = State.on;
@@ -663,14 +661,14 @@ private auto native_header_extract(L,Lo,O,T)(
an_object["body_nugget"] ~= line ~= "\n";
} else if (type["header_make"] == State.on
&& (line_occur["header_make"] > State.off)) { /+ header_make flag set +/
- if (matchFirst(line, rgx.native_header_sub)) { /+ sub-header +/
+ if (line.matchFirst(rgx.native_header_sub)) { /+ sub-header +/
debug(header1) { /+ writeln(line); +/ }
++line_occur["header_make"];
an_object["body_nugget"] ~= line ~= "\n";
}
} else if (type["header_meta"] == State.on
&& (line_occur["header_meta"] > State.off)) { /+ header_metadata flag set +/
- if (matchFirst(line, rgx.native_header_sub)) { /+ sub-header +/
+ if (line.matchFirst(rgx.native_header_sub)) { /+ sub-header +/
debug(header1) { /+ writeln(line); +/ }
++line_occur["header_meta"];
an_object["body_nugget"] ~= line ~= "\n";
@@ -723,14 +721,14 @@ private auto headerNativeToAA(Hn)(Hn src_header) {
auto dochead_meta = meta_aa;
auto set_header = HeaderDocMetadataAndMakeNativeToAA();
char[][] source_header_arr =
- split(cast(char[]) src_header, rgx.newline_eol_delimiter);
+ (cast(char[]) src_header).split(rgx.newline_eol_delimiter);
foreach(header_line; source_header_arr) {
- if (auto m = matchFirst(header_line, rgx.comment)) {
+ if (auto m = header_line.matchFirst(rgx.comment)) {
/+ matched comment +/
debug(comment) {
}
header_reset_states_common(line_occur, an_object, type);
- } else if ((matchFirst(header_line, rgx.native_header))
+ } else if ((header_line.matchFirst(rgx.native_header))
|| (type["header_make"] == State.on
&& (line_occur["header_make"] > State.off))
|| (type["header_meta"] == State.on