diff options
Diffstat (limited to 'src/sdp/ao_abstract_doc_source.d')
-rw-r--r-- | src/sdp/ao_abstract_doc_source.d | 229 |
1 files changed, 152 insertions, 77 deletions
diff --git a/src/sdp/ao_abstract_doc_source.d b/src/sdp/ao_abstract_doc_source.d index 0775daf..14b1071 100644 --- a/src/sdp/ao_abstract_doc_source.d +++ b/src/sdp/ao_abstract_doc_source.d @@ -226,6 +226,7 @@ template SiSUdocAbstraction() { /+ 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 } /+ ↓ abstract marked up document +/ auto SiSUdocAbstraction(Src,Make,Meta,Opt)( Src markup_sourcefile_content, @@ -728,9 +729,9 @@ template SiSUdocAbstraction() { 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"; @@ -770,6 +771,9 @@ template SiSUdocAbstraction() { 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) { @@ -803,10 +807,10 @@ template SiSUdocAbstraction() { 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"; @@ -818,6 +822,9 @@ template SiSUdocAbstraction() { 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=[ @@ -2039,10 +2046,10 @@ template SiSUdocAbstraction() { ); } 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"; @@ -2050,6 +2057,9 @@ template SiSUdocAbstraction() { 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"); @@ -2090,10 +2100,10 @@ template SiSUdocAbstraction() { 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"; @@ -2101,6 +2111,9 @@ template SiSUdocAbstraction() { 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"); @@ -2126,10 +2139,10 @@ template SiSUdocAbstraction() { } 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"; @@ -2137,6 +2150,9 @@ template SiSUdocAbstraction() { 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); @@ -2177,10 +2193,10 @@ template SiSUdocAbstraction() { 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"; @@ -2188,6 +2204,9 @@ template SiSUdocAbstraction() { 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"); @@ -2400,10 +2419,10 @@ template SiSUdocAbstraction() { 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"; @@ -2411,6 +2430,9 @@ template SiSUdocAbstraction() { 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"); @@ -2461,10 +2483,10 @@ template SiSUdocAbstraction() { 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"; @@ -2472,6 +2494,9 @@ template SiSUdocAbstraction() { 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"); @@ -2495,10 +2520,10 @@ template SiSUdocAbstraction() { 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"; @@ -2506,6 +2531,9 @@ template SiSUdocAbstraction() { 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"); @@ -2528,10 +2556,10 @@ template SiSUdocAbstraction() { 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"; @@ -2539,6 +2567,9 @@ template SiSUdocAbstraction() { 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"); @@ -2562,10 +2593,10 @@ template SiSUdocAbstraction() { 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"; @@ -2573,6 +2604,9 @@ template SiSUdocAbstraction() { 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"); @@ -3103,11 +3137,13 @@ template SiSUdocAbstraction() { } 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, @@ -3128,6 +3164,7 @@ template SiSUdocAbstraction() { 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; @@ -3138,6 +3175,7 @@ template SiSUdocAbstraction() { (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 ~= @@ -3154,9 +3192,14 @@ template SiSUdocAbstraction() { } 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)); @@ -3164,6 +3207,7 @@ template SiSUdocAbstraction() { } body { obj_txt_out = ""; + bool urls = false; tail = ""; /+ special endnotes +/ obj_txt_in = replaceAll( @@ -3179,9 +3223,11 @@ template SiSUdocAbstraction() { ); /+ 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); } @@ -3193,9 +3239,23 @@ template SiSUdocAbstraction() { 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)); @@ -3205,16 +3265,16 @@ template SiSUdocAbstraction() { 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)); @@ -3225,14 +3285,14 @@ template SiSUdocAbstraction() { 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() { } @@ -3249,16 +3309,16 @@ template SiSUdocAbstraction() { } 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)); @@ -3266,12 +3326,12 @@ template SiSUdocAbstraction() { } 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)); @@ -3279,8 +3339,8 @@ template SiSUdocAbstraction() { } 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() { } @@ -3325,7 +3385,7 @@ template SiSUdocAbstraction() { auto rgx = Rgx(); auto munge = ObjInlineMarkupMunge(); string[string] obj_txt; - 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 @@ -3343,6 +3403,11 @@ template SiSUdocAbstraction() { ? 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 = ""; @@ -3355,23 +3420,23 @@ template SiSUdocAbstraction() { } 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"]); @@ -3386,11 +3451,18 @@ template SiSUdocAbstraction() { 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; @@ -4616,7 +4688,7 @@ template SiSUdocAbstraction() { } invariant() { } - 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, @@ -4628,6 +4700,9 @@ template SiSUdocAbstraction() { LA lv_ancestors, I is_, PSn html_segnames_ptr, + fNr flag_notes_reg, + fNs flag_notes_star, + fL flag_links, ) in { debug(asserts){ |