aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2016-09-07 18:31:39 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:13 -0400
commit7520bb9fbd1eb03968805717ed751eb9e8bf86a9 (patch)
tree89a792afb473fdaca9d68992b13049a4189bbd24 /src/sdp
parentdocument structure, headings, debug info (diff)
heading debug info, moved
Diffstat (limited to 'src/sdp')
-rw-r--r--src/sdp/ao_abstract_doc_source.d78
-rw-r--r--src/sdp/ao_output_debugs.d77
2 files changed, 68 insertions, 87 deletions
diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d
index 0428291..603c025 100644
--- a/src/sdp/ao_abstract_doc_source.d
+++ b/src/sdp/ao_abstract_doc_source.d
@@ -538,84 +538,6 @@ template SiSUdocAbstraction() {
}
auto document_the =
contents_the_objects ~ endnotes_section ~ bookindex_section;
- debug(heading) { // heading
- string spc;
- foreach (o; document_the) {
- 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 to!string(DocStructMarkupHeading.h_sect_B):
- spc=" ";
- break;
- case 2:
- // case to!string(DocStructMarkupHeading.h_sect_C):
- spc=" ";
- break;
- case 3:
- // case to!string(DocStructMarkupHeading.h_sect_D):
- spc=" ";
- break;
- case 4:
- // case to!string(DocStructMarkupHeading.h_text_1):
- spc=" ";
- break;
- case 5:
- // case to!string(DocStructMarkupHeading.h_text_2):
- spc=" ";
- break;
- case 6:
- // case to!string(DocStructMarkupHeading.h_text_3):
- spc=" ";
- break;
- case 7:
- // case to!string(DocStructMarkupHeading.h_text_4):
- spc=" ";
- break;
- case 8:
- // case to!string(DocStructMarkupHeading.h_text_5):
- spc=" ";
- break;
- default:
- spc="";
- break;
- }
- // writeln(
- // spc, "* ", " ",
- // o
- // );
- writefln(
- "%s* %s\n (markup level: %s; collapsed level: %s)",
- spc,
- 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"]));
- }
- }
- }
- destroy(contents_the_objects);
- destroy(endnotes_section);
- destroy(bookindex_section);
- // struct Document {
- // char content;
- // char head_make;
- // char head_meta;
- // char bookindex_section;
- // char biblio;
- // }
- // struct Document {
- // char content;
- // char head_make;
- // char head_meta;
- // char bookindex_section;
- // char biblio;
- // }
auto t = tuple(
document_the,
bookindex_unordered_hashes,
diff --git a/src/sdp/ao_output_debugs.d b/src/sdp/ao_output_debugs.d
index a17f8ea..b80c53d 100644
--- a/src/sdp/ao_output_debugs.d
+++ b/src/sdp/ao_output_debugs.d
@@ -272,19 +272,69 @@ template SiSUoutputDebugs() {
}
}
+ debug(heading) { // heading
+ string spc;
+ foreach (o; contents) {
+ 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 to!string(DocStructMarkupHeading.h_sect_B):
+ spc=" ";
+ break;
+ case 2:
+ // case to!string(DocStructMarkupHeading.h_sect_C):
+ spc=" ";
+ break;
+ case 3:
+ // case to!string(DocStructMarkupHeading.h_sect_D):
+ spc=" ";
+ break;
+ case 4:
+ // case to!string(DocStructMarkupHeading.h_text_1):
+ spc=" ";
+ break;
+ case 5:
+ // case to!string(DocStructMarkupHeading.h_text_2):
+ spc=" ";
+ break;
+ case 6:
+ // case to!string(DocStructMarkupHeading.h_text_3):
+ spc=" ";
+ break;
+ case 7:
+ // case to!string(DocStructMarkupHeading.h_text_4):
+ spc=" ";
+ break;
+ case 8:
+ // case to!string(DocStructMarkupHeading.h_text_5):
+ spc=" ";
+ break;
+ default:
+ spc="";
+ break;
+ }
+ // writeln(
+ // spc, "* ", " ",
+ // o
+ // );
+ writefln(
+ "%s* %s\n (markup level: %s; collapsed level: %s)",
+ spc,
+ strip(o.object),
+ o.heading_attrib.lev_markup_number,
+ o.heading_attrib.lev_collapsed_number
+ );
+ }
+ }
+ }
debug(summary) {
string[string] check = [
"last_obj_cite_number" : "NA [debug \"checkdoc\" not run]",
];
- debug(checkdoc) {
- foreach (obj; contents) {
- if (obj.use == "content") {
- if (!empty(obj.obj_cite_number)) {
- check["last_obj_cite_number"] = obj.obj_cite_number;
- }
- }
- }
- }
debug(headings) {
writefln(
"%s\n%s:%s",
@@ -305,6 +355,15 @@ template SiSUoutputDebugs() {
}
}
}
+ debug(checkdoc) {
+ foreach (obj; contents) {
+ if (obj.use == "content") {
+ if (!empty(obj.obj_cite_number)) {
+ check["last_obj_cite_number"] = obj.obj_cite_number;
+ }
+ }
+ }
+ }
writefln(
"%s%s%s\n%s\n%s%s\n%s%s\n%s%s\n%s:%s",
scr_txt_color["green"],