From ea53522aa7c1a513724680b2b99b7c54a56db728 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 7 Sep 2016 11:20:14 -0400 Subject: document structure, headings, debug info --- org/ao_abstract_doc_source.org | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'org') diff --git a/org/ao_abstract_doc_source.org b/org/ao_abstract_doc_source.org index c3ae02d..af47654 100644 --- a/org/ao_abstract_doc_source.org +++ b/org/ao_abstract_doc_source.org @@ -767,41 +767,41 @@ auto document_the = debug(heading) { // heading string spc; foreach (o; document_the) { - if (o["is"] == "heading") { - switch (o["lev_markup_number"]) { - case "0": + if (o.is_a == "heading") { + switch (o.heading_attrib.lev_markup_number) { + case 0: // case to!string(DocStructMarkupHeading.h_sect_A): spc=""; break; - case "1": + case 1: // case to!string(DocStructMarkupHeading.h_sect_B): spc=" "; break; - case "2": + case 2: // case to!string(DocStructMarkupHeading.h_sect_C): spc=" "; break; - case "3": + case 3: // case to!string(DocStructMarkupHeading.h_sect_D): spc=" "; break; - case "4": + case 4: // case to!string(DocStructMarkupHeading.h_text_1): spc=" "; break; - case "5": + case 5: // case to!string(DocStructMarkupHeading.h_text_2): spc=" "; break; - case "6": + case 6: // case to!string(DocStructMarkupHeading.h_text_3): spc=" "; break; - case "7": + case 7: // case to!string(DocStructMarkupHeading.h_text_4): spc=" "; break; - case "8": + case 8: // case to!string(DocStructMarkupHeading.h_text_5): spc=" "; break; @@ -814,10 +814,11 @@ debug(heading) { // heading // o // ); writefln( - "%s* $s\n %s", + "%s* %s\n (markup level: %s; collapsed level: %s)", spc, - strip(o["obj"]), - o["attrib"] + strip(o.object), + o.heading_attrib.lev_markup_number, + o.heading_attrib.lev_collapsed_number ); // writeln(spc, "* ", to!string(o["lev_collapsed_number"]), " ", strip(o["obj"])); // tell_l("yellow", spc, strip(o["obj"])); @@ -2166,8 +2167,8 @@ auto heading_matched( assertions_doc_structure(an_object, lv); // includes most of the logic for collapsed levels switch (an_object["lev"]) { case "A": - an_object["obj"]=replaceFirst(an_object["obj"], rgx.variable_doc_title, to!string(dochead_meta_aa["title"]["main"])); - an_object["obj"]=replaceFirst(an_object["obj"], rgx.variable_doc_author, to!string(dochead_meta_aa["creator"]["author"])); + an_object["obj"]=replaceFirst(an_object["obj"], rgx.variable_doc_title, dochead_meta_aa["title"]["main"]); + an_object["obj"]=replaceFirst(an_object["obj"], rgx.variable_doc_author, dochead_meta_aa["creator"]["author"]); collapsed_lev["h0"] = 1; an_object["lev_collapsed_number"] = to!string(collapsed_lev["h0"]); -- cgit v1.2.3