aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/ao_doc_abstraction.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/ao_doc_abstraction.org')
-rw-r--r--org/ao_doc_abstraction.org232
1 files changed, 155 insertions, 77 deletions
diff --git a/org/ao_doc_abstraction.org b/org/ao_doc_abstraction.org
index 69093b6..63491de 100644
--- a/org/ao_doc_abstraction.org
+++ b/org/ao_doc_abstraction.org
@@ -397,6 +397,7 @@ string[][string][string] bookindex_unordered_hashes;
/+ node +/
ObjGenericComposite comp_obj_heading, comp_obj_location, comp_obj_block, comp_obj_code, comp_obj_poem_ocn, comp_obj_comment;
auto node_construct = NodeStructureMetadata();
+enum sObj { content, anchor_tags, notes_reg, notes_star, links }
#+END_SRC
*** scope
@@ -1037,9 +1038,9 @@ if ((type["heading"] == State.on)
an_object["is"] = "heading";
an_object_key="body_nugget";
auto substantive_object_and_anchor_tags_tuple =
- obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
- an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
- anchor_tags = substantive_object_and_anchor_tags_tuple[1];
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ an_object["substantive"] = substantive_object_and_anchor_tags_tuple[sObj.content];
+ anchor_tags = substantive_object_and_anchor_tags_tuple[sObj.anchor_tags];
if (to!int(an_object["lev_markup_number"]) == 4) {
segment_anchor_tag_that_object_belongs_to = anchor_tags[0];
segment_anchor_tag_that_object_belongs_to_uri = anchor_tags[0] ~ ".fnSuffix";
@@ -1079,6 +1080,9 @@ if ((type["heading"] == State.on)
lv_ancestors, // string[]
an_object["is"], // string
html_segnames_ptr, // int
+ substantive_object_and_anchor_tags_tuple[sObj.notes_reg],
+ substantive_object_and_anchor_tags_tuple[sObj.notes_star],
+ substantive_object_and_anchor_tags_tuple[sObj.links],
);
++heading_ptr;
debug(segments) {
@@ -1118,10 +1122,10 @@ if ((type["heading"] == State.on)
heading_ptr-1,
an_object["is"],
);
- auto substantive_object_and_anchor_tags_tuple =
- obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
- an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
- anchor_tags = substantive_object_and_anchor_tags_tuple[1];
+ auto substantive_obj_misc_tuple =
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_para = comp_obj_para.init;
comp_obj_para.use = "body";
comp_obj_para.is_of = "para";
@@ -1133,6 +1137,9 @@ if ((type["heading"] == State.on)
comp_obj_para.indent_base = indent["base_position"];
comp_obj_para.bullet = bullet;
comp_obj_para.anchor_tags = anchor_tags;
+ comp_obj_para.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_para.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_para.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_para;
_common_reset_(line_occur, an_object, type);
indent=[
@@ -2658,10 +2665,10 @@ void _poem_block_(L,O,T,C,N,Ma)(
);
}
an_object["is"] = "verse";
- auto substantive_object_and_anchor_tags_tuple =
- obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
- an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
- anchor_tags = substantive_object_and_anchor_tags_tuple[1];
+ auto substantive_obj_misc_tuple =
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
comp_obj_block.use = "body";
comp_obj_block.is_of = "block";
@@ -2669,6 +2676,9 @@ void _poem_block_(L,O,T,C,N,Ma)(
comp_obj_block.ocn = obj_cite_number;
comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
object_reset(an_object);
processing.remove("verse");
@@ -2709,10 +2719,10 @@ void _poem_block_(L,O,T,C,N,Ma)(
heading_ptr-1,
an_object["is"]
);
- auto substantive_object_and_anchor_tags_tuple =
- obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
- an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
- anchor_tags = substantive_object_and_anchor_tags_tuple[1];
+ auto substantive_obj_misc_tuple =
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
comp_obj_block.use = "body";
comp_obj_block.is_of = "block";
@@ -2720,6 +2730,9 @@ void _poem_block_(L,O,T,C,N,Ma)(
comp_obj_block.ocn = obj_cite_number;
comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
object_reset(an_object);
processing.remove("verse");
@@ -2745,10 +2758,10 @@ void _poem_block_(L,O,T,C,N,Ma)(
}
processing.remove("verse");
an_object["is"] = "verse";
- auto substantive_object_and_anchor_tags_tuple =
- obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
- an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
- anchor_tags = substantive_object_and_anchor_tags_tuple[1];
+ auto substantive_obj_misc_tuple =
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
comp_obj_block.use = "body";
comp_obj_block.is_of = "block";
@@ -2756,6 +2769,9 @@ void _poem_block_(L,O,T,C,N,Ma)(
comp_obj_block.ocn = obj_cite_number;
comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
obj_cite_number_poem["end"] = to!string(obj_cite_number);
object_reset(an_object);
@@ -2796,10 +2812,10 @@ void _poem_block_(L,O,T,C,N,Ma)(
heading_ptr-1,
an_object["is"]
);
- auto substantive_object_and_anchor_tags_tuple =
- obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
- an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
- anchor_tags = substantive_object_and_anchor_tags_tuple[1];
+ auto substantive_obj_misc_tuple =
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
comp_obj_block.use = "body";
comp_obj_block.is_of = "block";
@@ -2807,6 +2823,9 @@ void _poem_block_(L,O,T,C,N,Ma)(
comp_obj_block.ocn = obj_cite_number;
comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
object_reset(an_object);
processing.remove("verse");
@@ -3049,10 +3068,10 @@ void _block_flag_line_empty_(B)(
heading_ptr-1,
an_object["is"]
);
- auto substantive_object_and_anchor_tags_tuple =
- obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
- an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
- anchor_tags = substantive_object_and_anchor_tags_tuple[1];
+ auto substantive_obj_misc_tuple =
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_code = comp_obj_code.init;
comp_obj_code.use = "body";
comp_obj_code.is_of = "block";
@@ -3060,6 +3079,9 @@ void _block_flag_line_empty_(B)(
comp_obj_code.ocn = obj_cite_number;
comp_obj_code.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
comp_obj_code.text = an_object["substantive"];
+ comp_obj_code.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_code.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_code.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_code;
object_reset(an_object);
processing.remove("verse");
@@ -3110,10 +3132,10 @@ void _block_flag_line_empty_(B)(
heading_ptr-1,
an_object["is"]
);
- auto substantive_object_and_anchor_tags_tuple =
- obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
- an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
- anchor_tags = substantive_object_and_anchor_tags_tuple[1];
+ auto substantive_obj_misc_tuple =
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
comp_obj_block.use = "body";
comp_obj_block.is_of = "block";
@@ -3121,6 +3143,9 @@ void _block_flag_line_empty_(B)(
comp_obj_block.ocn = obj_cite_number;
comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
object_reset(an_object);
processing.remove("verse");
@@ -3144,10 +3169,10 @@ void _block_flag_line_empty_(B)(
heading_ptr-1,
an_object["is"]
);
- auto substantive_object_and_anchor_tags_tuple =
- obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
- an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
- anchor_tags = substantive_object_and_anchor_tags_tuple[1];
+ auto substantive_obj_misc_tuple =
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
comp_obj_block.use = "body";
comp_obj_block.is_of = "block";
@@ -3155,6 +3180,9 @@ void _block_flag_line_empty_(B)(
comp_obj_block.ocn = obj_cite_number;
comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
object_reset(an_object);
processing.remove("verse");
@@ -3177,10 +3205,10 @@ void _block_flag_line_empty_(B)(
heading_ptr-1,
an_object["is"]
);
- auto substantive_object_and_anchor_tags_tuple =
- obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
- an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
- anchor_tags = substantive_object_and_anchor_tags_tuple[1];
+ auto substantive_obj_misc_tuple =
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa);
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content];
+ anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
comp_obj_block.use = "body";
comp_obj_block.is_of = "block";
@@ -3188,6 +3216,9 @@ void _block_flag_line_empty_(B)(
comp_obj_block.ocn = obj_cite_number;
comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
object_reset(an_object);
processing.remove("verse");
@@ -3211,10 +3242,10 @@ void _block_flag_line_empty_(B)(
heading_ptr-1,
an_object["is"]
);
- auto substantive_object_and_anchor_tags_tuple =
- obj_im.obj_inline_markup_and_anchor_tags(an_object, an_object_key, dochead_make_aa);
- an_object["substantive"] = substantive_object_and_anchor_tags_tuple[0];
- anchor_tags = substantive_object_and_anchor_tags_tuple[1];
+ auto substantive_obj_misc_tuple =
+ obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, dochead_make_aa); // ...
+ an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; // ...
+ anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags];
comp_obj_block = comp_obj_block.init;
comp_obj_block.use = "body";
comp_obj_block.is_of = "block";
@@ -3222,6 +3253,9 @@ void _block_flag_line_empty_(B)(
comp_obj_block.ocn = obj_cite_number;
comp_obj_block.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
comp_obj_block.text = an_object["substantive"];
+ comp_obj_block.inline_notes_reg = substantive_obj_misc_tuple[sObj.notes_reg];
+ comp_obj_block.inline_notes_star = substantive_obj_misc_tuple[sObj.notes_star];
+ comp_obj_block.inline_links = substantive_obj_misc_tuple[sObj.links];
the_document_body_section ~= comp_obj_block;
object_reset(an_object);
processing.remove("verse");
@@ -3794,11 +3828,13 @@ struct ObjInlineMarkupMunge {
}
return obj_txt_in;
}
- string footnotes_endnotes_markup_and_number_or_stars(Ot)(Ot obj_txt_in, bool reset_note_numbers) { // here endnotes are marked up
+ auto footnotes_endnotes_markup_and_number_or_stars(Ot)(Ot obj_txt_in, bool reset_note_numbers) {
debug(asserts){
static assert(is(typeof(obj_txt_in) == string));
}
/+ endnotes (regular) +/
+ bool notes_reg = false;
+ bool notes_star = false;
obj_txt_in =
replaceAll(
obj_txt_in,
@@ -3819,6 +3855,7 @@ struct ObjInlineMarkupMunge {
stage_reset_note_numbers = false;
foreach(n; m) {
if (match(to!string(n.hit), rgx.inline_al_delimiter_open_symbol_star)) {
+ notes_star = true;
++n_foot_sp_asterisk;
asterisks_ = "*";
n_foot=n_foot_sp_asterisk;
@@ -3829,6 +3866,7 @@ struct ObjInlineMarkupMunge {
(mkup.en_a_o ~ replicate(asterisks_, n_foot_sp_asterisk) ~ " ")
) ~ "\n");
} else if (match(to!string(n.hit), rgx.inline_al_delimiter_open_regular)) {
+ notes_reg = true;
++n_foot_reg;
n_foot=n_foot_reg;
obj_txt_out ~=
@@ -3845,9 +3883,14 @@ struct ObjInlineMarkupMunge {
} else {
obj_txt_out = obj_txt_in;
}
- return obj_txt_out;
+ auto t = tuple(
+ obj_txt_out,
+ notes_reg,
+ notes_star,
+ );
+ return t;
}
- private auto object_notes_(Ot)(Ot obj_txt_in, bool reset_note_numbers=false)
+ private auto object_notes_and_links_(Ot)(Ot obj_txt_in, bool reset_note_numbers=false)
in {
debug(asserts){
assert(is(typeof(obj_txt_in) == string));
@@ -3855,6 +3898,7 @@ struct ObjInlineMarkupMunge {
}
body {
obj_txt_out = "";
+ bool urls = false;
tail = "";
/+ special endnotes +/
obj_txt_in = replaceAll(
@@ -3870,9 +3914,11 @@ struct ObjInlineMarkupMunge {
);
/+ url matched +/
if (match(obj_txt_in, rgx.inline_url)) {
+ urls = true;
obj_txt_in = url_links(obj_txt_in);
}
- obj_txt_out = footnotes_endnotes_markup_and_number_or_stars(obj_txt_in, reset_note_numbers);
+ auto ftn = footnotes_endnotes_markup_and_number_or_stars(obj_txt_in, reset_note_numbers);
+ obj_txt_out = ftn[0];
debug(footnotes) {
writeln(obj_txt_out, tail);
}
@@ -3884,9 +3930,23 @@ struct ObjInlineMarkupMunge {
writeln(m.hit);
}
}
- return obj_txt_out;
+ auto t = tuple(
+ to!string(obj_txt_out),
+ ftn[1],
+ ftn[2],
+ urls,
+ );
+ return t;
}
- string para(Ot)(Ot obj_txt_in)
+ auto init()
+ in { }
+ body {
+ auto t = object_notes_and_links_("");
+ return t;
+ }
+ invariant() {
+ }
+ auto para(Ot)(Ot obj_txt_in)
in {
debug(asserts){
static assert(is(typeof(obj_txt_in) == string));
@@ -3896,16 +3956,16 @@ struct ObjInlineMarkupMunge {
obj_txt["munge"]=obj_txt_in;
obj_txt["munge"]=replaceFirst(obj_txt["munge"], rgx.para_attribs, "");
obj_txt["munge"]=replaceFirst(obj_txt["munge"], rgx.obj_cite_number_off_all, "");
- obj_txt["munge"]=object_notes_(obj_txt["munge"]);
+ auto t = object_notes_and_links_(obj_txt["munge"]);
debug(munge) {
writeln(__LINE__);
writeln(obj_txt_in);
writeln(__LINE__);
writeln(to!string(obj_txt["munge"]));
}
- return obj_txt["munge"];
+ return t;
}
- string heading(Ot)(Ot obj_txt_in, bool reset_note_numbers=false)
+ auto heading(Ot)(Ot obj_txt_in, bool reset_note_numbers=false)
in {
debug(asserts){
static assert(is(typeof(obj_txt_in) == string));
@@ -3916,14 +3976,14 @@ struct ObjInlineMarkupMunge {
obj_txt["munge"]=replaceFirst(obj_txt["munge"], rgx.heading, "");
obj_txt["munge"]=replaceFirst(obj_txt["munge"], rgx.obj_cite_number_off_all, "");
obj_txt["munge"]=strip(obj_txt["munge"]);
- obj_txt["munge"]=object_notes_(obj_txt["munge"], reset_note_numbers);
+ auto t = object_notes_and_links_(obj_txt["munge"], reset_note_numbers);
debug(munge) {
writeln(__LINE__);
writeln(obj_txt_in);
writeln(__LINE__);
writeln(to!string(obj_txt["munge"]));
}
- return obj_txt["munge"];
+ return t;
}
invariant() {
}
@@ -3940,16 +4000,16 @@ struct ObjInlineMarkupMunge {
}
invariant() {
}
- string group(string obj_txt_in)
+ auto group(string obj_txt_in)
in { }
body {
obj_txt["munge"]=obj_txt_in;
- obj_txt["munge"]=object_notes_(obj_txt["munge"]);
- return obj_txt["munge"];
+ auto t = object_notes_and_links_(obj_txt["munge"]);
+ return t;
}
invariant() {
}
- string block(Ot)(Ot obj_txt_in)
+ auto block(Ot)(Ot obj_txt_in)
in {
debug(asserts){
static assert(is(typeof(obj_txt_in) == string));
@@ -3957,12 +4017,12 @@ struct ObjInlineMarkupMunge {
}
body {
obj_txt["munge"]=obj_txt_in;
- obj_txt["munge"]=object_notes_(obj_txt["munge"]);
- return obj_txt["munge"];
+ auto t = object_notes_and_links_(obj_txt["munge"]);
+ return t;
}
invariant() {
}
- string verse(Ot)(Ot obj_txt_in)
+ auto verse(Ot)(Ot obj_txt_in)
in {
debug(asserts){
static assert(is(typeof(obj_txt_in) == string));
@@ -3970,8 +4030,8 @@ struct ObjInlineMarkupMunge {
}
body {
obj_txt["munge"]=obj_txt_in;
- obj_txt["munge"]=object_notes_(obj_txt["munge"]);
- return obj_txt["munge"];
+ auto t = object_notes_and_links_(obj_txt["munge"]);
+ return t;
}
invariant() {
}
@@ -4029,7 +4089,7 @@ struct ObjInlineMarkup {
#+name: ao_emitters_obj_inline_markup_and_anchor_tags_and_misc
#+BEGIN_SRC d
- auto obj_inline_markup_and_anchor_tags(O,K,Ma)(
+ auto obj_inline_markup_and_anchor_tags_and_misc(O,K,Ma)(
O obj_,
K obj_key_,
Ma dochead_make_aa
@@ -4047,6 +4107,11 @@ struct ObjInlineMarkup {
? obj_txt["munge"]
: strip(obj_txt["munge"]);
static __gshared string[] anchor_tags_ = [];
+ auto x = munge.init;
+ bool[string] obj_notes_and_links;
+ obj_notes_and_links["notes_reg"] = false;
+ obj_notes_and_links["notes_star"] = false;
+ obj_notes_and_links["links"] = false;
switch (obj_["is"]) {
case "heading":
static __gshared string anchor_tag = "";
@@ -4059,23 +4124,23 @@ struct ObjInlineMarkup {
} else if (obj_["lev"] == "1") {
writeln("heading anchor tag missing: ", obj_txt["munge"]);
}
- obj_txt["munge"]=munge.heading(obj_txt["munge"], reset_note_numbers);
+ x =munge.heading(obj_txt["munge"], reset_note_numbers);
reset_note_numbers=false;
- break;
+ goto default;
case "para":
- obj_txt["munge"]=munge.para(obj_txt["munge"]);
- break;
- case "code":
- obj_txt["munge"]=munge.code(obj_txt["munge"]);
- break;
+ x = munge.para(obj_txt["munge"]);
+ goto default;
case "group":
- obj_txt["munge"]=munge.group(obj_txt["munge"]);
- break;
+ x = munge.group(obj_txt["munge"]);
+ goto default;
case "block":
- obj_txt["munge"]=munge.block(obj_txt["munge"]);
- break;
+ x = munge.block(obj_txt["munge"]);
+ goto default;
case "verse":
- obj_txt["munge"]=munge.verse(obj_txt["munge"]);
+ x = munge.verse(obj_txt["munge"]);
+ goto default;
+ case "code":
+ obj_txt["munge"]=munge.code(obj_txt["munge"]);
break;
case "quote":
obj_txt["munge"]=munge.quote(obj_txt["munge"]);
@@ -4090,11 +4155,18 @@ struct ObjInlineMarkup {
munge.initialize_note_numbers();
break;
default:
+ obj_txt["munge"]=x[0];
+ obj_notes_and_links["notes_reg"] = x[1];
+ obj_notes_and_links["notes_star"] = x[2];
+ obj_notes_and_links["links"] = x[3];
break;
}
auto t = tuple(
obj_txt["munge"],
anchor_tags_,
+ obj_notes_and_links["notes_reg"],
+ obj_notes_and_links["notes_star"],
+ obj_notes_and_links["links"],
);
anchor_tags_=[];
return t;
@@ -5572,7 +5644,7 @@ struct NodeStructureMetadata {
#+name: ao_emitters_metadata
#+BEGIN_SRC d
- ObjGenericComposite node_emitter_heading(T,L,Lm,Lc,Ta,N,C,P,LA,I,PSn)(
+ ObjGenericComposite node_emitter_heading(T,L,Lm,Lc,Ta,N,C,P,LA,I,PSn,fNr,fNs,fL)(
T _text,
L lev,
Lm lev_markup_number,
@@ -5584,6 +5656,9 @@ struct NodeStructureMetadata {
LA lv_ancestors,
I is_,
PSn html_segnames_ptr,
+ fNr flag_notes_reg,
+ fNs flag_notes_star,
+ fL flag_links,
)
in {
debug(asserts){
@@ -6056,6 +6131,9 @@ struct ObjGenericComposite {
string[string][string] node;
int[] dom_markedup = [ 0, 0, 0, 0, 0, 0, 0, 0,];
int[] dom_collapsed = [ 0, 0, 0, 0, 0, 0, 0, 0,];
+ bool inline_links = false;
+ bool inline_notes_reg = false;
+ bool inline_notes_star = false;
}
#+END_SRC