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 --- src/sdp/ao_abstract_doc_source.d | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d index 616d124..0428291 100644 --- a/src/sdp/ao_abstract_doc_source.d +++ b/src/sdp/ao_abstract_doc_source.d @@ -541,41 +541,41 @@ template SiSUdocAbstraction() { 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; @@ -588,10 +588,11 @@ template SiSUdocAbstraction() { // 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"])); @@ -1749,8 +1750,8 @@ template SiSUdocAbstraction() { 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