aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
Diffstat (limited to 'org')
-rw-r--r--org/ao_abstract_doc_source.org48
-rw-r--r--org/ao_output_debugs.org32
2 files changed, 53 insertions, 27 deletions
diff --git a/org/ao_abstract_doc_source.org b/org/ao_abstract_doc_source.org
index d1bc79b..7c10dca 100644
--- a/org/ao_abstract_doc_source.org
+++ b/org/ao_abstract_doc_source.org
@@ -2821,30 +2821,15 @@ struct ObjInlineMarkupMunge {
string[string] obj_txt;
int n_foot, n_foot_reg, n_foot_sp_asterisk, n_foot_sp_plus;
string obj_txt_out, tail, note;
+ auto rgx = Rgx();
+ auto mkup = InlineMarkup();
private auto initialize_note_numbers() {
n_foot = 0;
n_foot_reg = 0;
n_foot_sp_asterisk = 0;
n_foot_sp_plus = 0;
}
- private auto object_notes_(string obj_txt_in)
- in { }
- body {
- auto rgx = Rgx();
- auto mkup = InlineMarkup();
- obj_txt_out = "";
- tail = "";
- obj_txt_in = replaceAll(
- obj_txt_in,
- rgx.inline_notes_curly_sp_asterisk,
- (mkup.en_a_o ~ "*" ~ " $1" ~ mkup.en_a_c)
- );
- obj_txt_in =
- replaceAll(
- obj_txt_in,
- rgx.inline_notes_curly_sp_plus,
- (mkup.en_a_o ~ "+" ~ " $1" ~ mkup.en_a_c)
- );
+ string url_links(string obj_txt_in) {
/+ url matched +/
if (auto m = matchAll(obj_txt_in, rgx.inline_url)) {
/+ link: naked url: http://url +/
@@ -2887,6 +2872,9 @@ struct ObjInlineMarkupMunge {
);
}
}
+ return obj_txt_in;
+ }
+ string footnotes_endnotes(string obj_txt_in) {
/+ endnotes (regular) +/
obj_txt_in =
replaceAll(
@@ -2916,6 +2904,30 @@ struct ObjInlineMarkupMunge {
} else {
obj_txt_out = obj_txt_in;
}
+ return obj_txt_in;
+ }
+ private auto object_notes_(string obj_txt_in)
+ in { }
+ body {
+ obj_txt_out = "";
+ tail = "";
+ /+ special endnotes +/
+ obj_txt_in = replaceAll(
+ obj_txt_in,
+ rgx.inline_notes_curly_sp_asterisk,
+ (mkup.en_a_o ~ "*" ~ " $1" ~ mkup.en_a_c)
+ );
+ obj_txt_in =
+ replaceAll(
+ obj_txt_in,
+ rgx.inline_notes_curly_sp_plus,
+ (mkup.en_a_o ~ "+" ~ " $1" ~ mkup.en_a_c)
+ );
+ /+ url matched +/
+ if (auto m = matchAll(obj_txt_in, rgx.inline_url)) {
+ obj_txt_in = url_links(obj_txt_in);
+ }
+ obj_txt_in = footnotes_endnotes(obj_txt_in);
debug(footnotes) {
writeln(obj_txt_out, tail);
}
diff --git a/org/ao_output_debugs.org b/org/ao_output_debugs.org
index 67f35ae..5349200 100644
--- a/org/ao_output_debugs.org
+++ b/org/ao_output_debugs.org
@@ -718,24 +718,38 @@ debug(checkdoc) {
#+name: ao_output_debugs_summary
#+BEGIN_SRC d
writefln(
- "%s\n\"%s\", %s\n%s\n%s\n%s%s\n%s%s\n%s%s\n%s%s\n%s%s\n%s%s\n%s:%s\n",
- "-------------------------------",
+ "%s\n\"%s\", %s\n%s\n%s\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n%s%10d\n(%s: %s)",
+ "---------------------------------",
dochead_meta["title"]["full"],
dochead_meta["creator"]["author"],
- "-------------------------------",
fn_src,
+ "---------------------------------",
+ "length toc array: ",
+ to!int(contents["toc_seg"].length),
"length contents array: ",
- contents["body"].length,
+ to!int(contents["body"].length),
"last obj_cite_number: ",
- check["last_obj_cite_number"],
+ to!int(check["last_obj_cite_number"]),
+ "length endnotes: ",
+ (contents["endnotes_seg"].length > 1)
+ ? (to!int(contents["endnotes_seg"].length))
+ : 0,
"length glossary: ",
- contents["glossary"].length,
+ (contents["glossary"].length > 1)
+ ? (to!int(contents["glossary"].length))
+ : 0,
"length biblio: ",
- contents["bibliography"].length,
+ (contents["bibliography"].length > 1)
+ ? (to!int(contents["bibliography"].length))
+ : 0,
"length bookindex: ",
- contents["bookindex_seg"].length,
+ (contents["bookindex_seg"].length > 1)
+ ? (to!int(contents["bookindex_seg"].length))
+ : 0,
"length blurb: ",
- contents["blurb"].length,
+ (contents["blurb"].length > 1)
+ ? (to!int(contents["blurb"].length))
+ : 0,
__FILE__,
__LINE__,
);