From cef88dc6ce96abb8fb0db3d8fd723fef3636695d Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Fri, 20 Dec 2019 09:19:30 -0500 Subject: bugfix toc endnotes links in xmls, other minor --- org/metaverse.org | 4 ++-- org/out_odt.org | 2 +- org/out_sqlite.org | 2 +- org/out_xmls.org | 12 ++++++++---- src/doc_reform/io_out/odt.d | 2 +- src/doc_reform/io_out/sqlite.d | 2 +- src/doc_reform/io_out/xmls.d | 12 ++++++++---- src/doc_reform/meta/metadoc_from_src.d | 4 ++-- 8 files changed, 24 insertions(+), 16 deletions(-) diff --git a/org/metaverse.org b/org/metaverse.org index 77a9051..cc8414b 100644 --- a/org/metaverse.org +++ b/org/metaverse.org @@ -1825,7 +1825,7 @@ comp_obj_toc.attrib.indent_hang = indent["hang_position"]; comp_obj_toc.attrib.indent_base = indent["base_position"]; comp_obj_toc.attrib.bullet = false; if (the_endnotes_section.length > 1) { - toc_txt_ = format("%s%s%s%s%s#%s", + toc_txt_ = format("%s%s%s%s#%s%s", mkup.lnk_o, "Endnotes", mkup.lnk_c, @@ -6961,7 +6961,7 @@ struct NotesSection { ObjGenericComposite comp_obj_endnote_; comp_obj_endnote_ = comp_obj_endnote_.init; comp_obj_endnote_.metainfo.is_of_part = "backmatter"; - comp_obj_endnote_.metainfo.is_of_section = "endnote"; + comp_obj_endnote_.metainfo.is_of_section = "endnotes"; comp_obj_endnote_.metainfo.is_of_type = "para"; comp_obj_endnote_.metainfo.is_a = "endnote"; comp_obj_endnote_.metainfo.ocn = 0; diff --git a/org/out_odt.org b/org/out_odt.org index 3092aa5..66fe2b4 100644 --- a/org/out_odt.org +++ b/org/out_odt.org @@ -593,7 +593,7 @@ string para(O,M)( assert(obj.metainfo.is_of_part == "body" || "frontmatter" || "backmatter"); assert(obj.metainfo.is_of_section == "body" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); assert(obj.metainfo.is_of_type == "para"); - assert(obj.metainfo.is_a == "para" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); + assert(obj.metainfo.is_a == "para" || "toc" || "endnote" || "glossary" || "bibliography" || "bookindex" || "blurb"); string _o_txt_odt; if (obj.metainfo.dummy_heading && (obj.metainfo.is_a == "toc" || obj.metainfo.is_a == "heading")) { diff --git a/org/out_sqlite.org b/org/out_sqlite.org index 0d1bbef..9f247b1 100644 --- a/org/out_sqlite.org +++ b/org/out_sqlite.org @@ -789,7 +789,7 @@ string html_para(M,O)( assert(obj.metainfo.is_of_part == "body" || "frontmatter" || "backmatter"); assert(obj.metainfo.is_of_section == "body" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); assert(obj.metainfo.is_of_type == "para"); - assert(obj.metainfo.is_a == "para" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); + assert(obj.metainfo.is_a == "para" || "toc" || "endnote" || "glossary" || "bibliography" || "bookindex" || "blurb"); string _txt = munge_html(doc_matters, obj); _txt = (obj.attrib.bullet) ? ("●  " ~ _txt) : _txt; _txt = inline_markup(doc_matters, obj, _txt); diff --git a/org/out_xmls.org b/org/out_xmls.org index 5cbe430..112f294 100644 --- a/org/out_xmls.org +++ b/org/out_xmls.org @@ -607,7 +607,7 @@ Tuple!(string, string[]) inline_notes_seg(O,M)( /+ need markup for text, and separated footnote +/ foreach(m; _txt.matchAll(rgx.inline_notes_al_special_char_note)) { _endnotes ~= format( - "%s%s%s%s\n %s%s%s%s%s\n %s\n%s", + "%s%s%s%s\n %s%s%s%s%s %s\n%s", "

", "", " ┃", obj.metainfo.identifier, - (doc_matters.opt.action.ocn_off) ? "" : ((obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier), + (doc_matters.opt.action.ocn_off) + ? "" + : ((obj.metainfo.object_number.empty) + ? "" + : obj.metainfo.identifier), obj.metainfo.is_a, obj.attrib.indent_hang, obj.attrib.indent_base, diff --git a/src/doc_reform/io_out/odt.d b/src/doc_reform/io_out/odt.d index 1a553d1..09bcf65 100644 --- a/src/doc_reform/io_out/odt.d +++ b/src/doc_reform/io_out/odt.d @@ -404,7 +404,7 @@ template formatODT() { assert(obj.metainfo.is_of_part == "body" || "frontmatter" || "backmatter"); assert(obj.metainfo.is_of_section == "body" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); assert(obj.metainfo.is_of_type == "para"); - assert(obj.metainfo.is_a == "para" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); + assert(obj.metainfo.is_a == "para" || "toc" || "endnote" || "glossary" || "bibliography" || "bookindex" || "blurb"); string _o_txt_odt; if (obj.metainfo.dummy_heading && (obj.metainfo.is_a == "toc" || obj.metainfo.is_a == "heading")) { diff --git a/src/doc_reform/io_out/sqlite.d b/src/doc_reform/io_out/sqlite.d index c779e00..f9a17d4 100644 --- a/src/doc_reform/io_out/sqlite.d +++ b/src/doc_reform/io_out/sqlite.d @@ -481,7 +481,7 @@ template SQLiteFormatAndLoadObject() { assert(obj.metainfo.is_of_part == "body" || "frontmatter" || "backmatter"); assert(obj.metainfo.is_of_section == "body" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); assert(obj.metainfo.is_of_type == "para"); - assert(obj.metainfo.is_a == "para" || "toc" || "endnotes" || "glossary" || "bibliography" || "bookindex" || "blurb"); + assert(obj.metainfo.is_a == "para" || "toc" || "endnote" || "glossary" || "bibliography" || "bookindex" || "blurb"); string _txt = munge_html(doc_matters, obj); _txt = (obj.attrib.bullet) ? ("●  " ~ _txt) : _txt; _txt = inline_markup(doc_matters, obj, _txt); diff --git a/src/doc_reform/io_out/xmls.d b/src/doc_reform/io_out/xmls.d index 739c379..f48b6be 100644 --- a/src/doc_reform/io_out/xmls.d +++ b/src/doc_reform/io_out/xmls.d @@ -476,7 +476,7 @@ template outputXHTMLs() { /+ need markup for text, and separated footnote +/ foreach(m; _txt.matchAll(rgx.inline_notes_al_special_char_note)) { _endnotes ~= format( - "%s%s%s%s\n %s%s%s%s%s\n %s\n%s", + "%s%s%s%s\n %s%s%s%s%s %s\n%s", "

", "", " ┃", obj.metainfo.identifier, - (doc_matters.opt.action.ocn_off) ? "" : ((obj.metainfo.object_number.empty) ? "" : obj.metainfo.identifier), + (doc_matters.opt.action.ocn_off) + ? "" + : ((obj.metainfo.object_number.empty) + ? "" + : obj.metainfo.identifier), obj.metainfo.is_a, obj.attrib.indent_hang, obj.attrib.indent_base, diff --git a/src/doc_reform/meta/metadoc_from_src.d b/src/doc_reform/meta/metadoc_from_src.d index 9178fae..d37e029 100644 --- a/src/doc_reform/meta/metadoc_from_src.d +++ b/src/doc_reform/meta/metadoc_from_src.d @@ -1385,7 +1385,7 @@ template docAbstraction() { comp_obj_toc.attrib.indent_base = indent["base_position"]; comp_obj_toc.attrib.bullet = false; if (the_endnotes_section.length > 1) { - toc_txt_ = format("%s%s%s%s%s#%s", + toc_txt_ = format("%s%s%s%s#%s%s", mkup.lnk_o, "Endnotes", mkup.lnk_c, @@ -5590,7 +5590,7 @@ template docAbstraction() { ObjGenericComposite comp_obj_endnote_; comp_obj_endnote_ = comp_obj_endnote_.init; comp_obj_endnote_.metainfo.is_of_part = "backmatter"; - comp_obj_endnote_.metainfo.is_of_section = "endnote"; + comp_obj_endnote_.metainfo.is_of_section = "endnotes"; comp_obj_endnote_.metainfo.is_of_type = "para"; comp_obj_endnote_.metainfo.is_a = "endnote"; comp_obj_endnote_.metainfo.ocn = 0; -- cgit v1.2.3