diff options
Diffstat (limited to 'org/ao_conf_make_meta.org')
-rw-r--r-- | org/ao_conf_make_meta.org | 45 |
1 files changed, 6 insertions, 39 deletions
diff --git a/org/ao_conf_make_meta.org b/org/ao_conf_make_meta.org index fa3c88d..91630c0 100644 --- a/org/ao_conf_make_meta.org +++ b/org/ao_conf_make_meta.org @@ -185,29 +185,14 @@ private auto documentMakeSDLangToAAmake(Tag document_make_sdlang) { /+ TODO stuff to fix +/ - // hs = "link"; - // if (!(document_make_sdlang.tags[hm][0].maybe.attributes[hs].empty) - // && (document_make_sdlang.tags[hm][0].attributes[hs][0].value.length > 1)) { - // debug(headersdlang) { - // writeln(document_make_sdlang.tags[hm][0].attributes[hs][0].value); - // } - // dochead_meta[hm][hs] = - // to!string(document_make_sdlang.tags[hm][0].attributes[hs][0].value); - // } } +/ - // debug(headersdlang) { - // writeln(dochead_make); - // } return dochead_make; } #+END_SRC * C.a. header native :header:native: -// mixin SiSUheader; -// auto set_header = HeaderDocMetadataAndMakeNativeToAA(); // reintroduce - ** native header document metadata in associative array :aa: #+name: ao_markup_header_extract_native @@ -382,15 +367,6 @@ body { case "links": destroy(hm); destroy(hs); - // if (match(hs, rgx.native_subhead_links)) { - // if (dochead_meta[hm][hs]) { - // dochead_meta[hm][hs] = to!string(s.captures[2]); - // } - // } else { - // writeln("not a valid header type:", hm, ":", hs); - // destroy(hm); - // destroy(hs); - // } break; default: break; @@ -425,7 +401,7 @@ private auto native_header_extract( type["header_make"] = State.on; type["header_meta"] = State.off; ++line_occur["header_make"]; - an_object["obj"] ~= line ~= "\n"; + an_object["nugget"] ~= line ~= "\n"; } else if (matchFirst(line, rgx.native_header)) { /+ matched header_metadata +/ /+ (generic header match and not previously caught by header_make) +/ debug(header1) { /+ writeln(line); +/ } @@ -433,20 +409,20 @@ private auto native_header_extract( type["header_make"] = State.off; type["header_meta"] = State.on; ++line_occur["header_meta"]; - an_object["obj"] ~= line ~= "\n"; + an_object["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 +/ debug(header1) { /+ writeln(line); +/ } ++line_occur["header_make"]; - an_object["obj"] ~= line ~= "\n"; + an_object["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 +/ debug(header1) { /+ writeln(line); +/ } ++line_occur["header_meta"]; - an_object["obj"] ~= line ~= "\n"; + an_object["nugget"] ~= line ~= "\n"; } } return an_object; @@ -462,13 +438,10 @@ auto header_reset_states_common( ref string[string] an_object, ref int[string] type ) { - // line_occur["header"] = State.off; line_occur["header_make"] = State.off; line_occur["header_meta"] = State.off; type["header"] = State.off; - // type["header_make"] = State.off; - // type["header_meta"] = State.off; - an_object.remove("obj"); + an_object.remove("nugget"); an_object.remove("is"); an_object.remove("attrib"); } @@ -496,11 +469,8 @@ private auto headerNativeToAA(in char[] src_header) { if (auto m = matchFirst(header_line, rgx.comment)) { /+ matched comment +/ debug(comment) { - // tell_l("blue", header_line); } header_reset_states_common(line_occur, an_object, type); - // type["header_make"] = State.off; - // type["header_meta"] = State.off; } else if ((matchFirst(header_line, rgx.native_header)) || (type["header_make"] == State.on && (line_occur["header_make"] > State.off)) @@ -509,7 +479,7 @@ private auto headerNativeToAA(in char[] src_header) { if (header_line.length == 0) { /+ header_make instructions (current line empty) +/ auto dochead_metadata_and_make = - set_header.header_metadata_and_make_aa(strip(an_object["obj"]), dochead_meta, dochead_make); + set_header.header_metadata_and_make_aa(strip(an_object["nugget"]), dochead_meta, dochead_make); static assert(!isTypeTuple!(dochead_metadata_and_make)); dochead_meta = dochead_metadata_and_make[0]; dochead_make = dochead_metadata_and_make[1]; @@ -522,8 +492,6 @@ private auto headerNativeToAA(in char[] src_header) { } else { an_object = native_header_extract(header_line, line_occur, an_object, type); } - } else { - // writeln(__LINE__); } } auto t = tuple( @@ -579,7 +547,6 @@ private auto headerSDLangGet(in char[] src_header) { foreach(header_line; source_header_arr) { if (!match(header_line, rgx.comments)) { header_clean ~= header_line ~ "\n"; - // writeln(header_line); } } /+ get sdlang tags +/ |