[[0-9]+)`, "mg"); // {^{73.}^}#noteref_73
#+END_SRC
@@ -331,8 +331,8 @@ static smid_inline_url_generic = ctRegex!(`(?:^|[}(\[ ])(
static smid_inline_url = ctRegex!(`((?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)[a-zA-Z0-9_]\S*)`, "mg");
static smid_inline_link_naked_url = ctRegex!(`(?P]^|[ (\[])(?P(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤)\S+?)(?=[.,;:?!'"]?([ )\]]|$))`, "mg");
static smid_inline_link_markup_regular = ctRegex!(`(?P^|[ (\[])\{\s*(?P.+?)\s*\}(?P(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)\S+?)(?=[;:!,?.]?([ )\]]|$))`, "mg");
-static smid_inline_link_endnote_url_helper_punctuated = ctRegex!(`\{~\^\s+(?P.+?)\}(?P(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)\S+?)(?=[.,;:?!]?([ ]|$))`, "mg");
-static smid_inline_link_endnote_url_helper = ctRegex!(`\{~\^\s+(?P.+?)\}(?P(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)\S+)`, "mg");
+static smid_inline_link_endnote_url_helper_punctuated = ctRegex!(`\{~\^\s+(?P.+?)\s*\}(?P(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)\S+?)(?=[.,;:?!]?([ ]|$))`, "mg");
+static smid_inline_link_endnote_url_helper = ctRegex!(`\{~\^\s+(?P.+?)\s*\}(?P(?:(?:https?|git):\/\/|¤?\.\.\/|¤?\.\/|¤|#)\S+)`, "mg");
#+END_SRC
#+BEGIN_SRC d
@@ -507,7 +507,6 @@ static make_breakcolumn = ctRegex!(`break=(?P.+?)】`, "m");
static inline_notes_al_all_note = ctRegex!(`【(?P\d+|(?:[*]|[+])+)\s+(?P.+?)\s*】`, "mg");
static inline_notes_al_regular_number_note = ctRegex!(`【(?P\d+)\s+(?P.+?)\s*】`, "mg");
+// static inline_notes_al_all_note = ctRegex!(`【(?P\d+|(?:[*]|[+])+)\s+(?P.+?)\s*(≫\s\d+)?\s*】`, "mg"); // ocn of origin would be useful in endnote section
+// static inline_notes_al_regular_number_note = ctRegex!(`【(?P\d+)\s+(?P.+?)\s*(≫\s\d+)?\s*】`, "mg"); // ocn of origin would be useful in endnote section
static inline_notes_al_special_char_note = ctRegex!(`【(?P(?:[*]|[+])+)\s+(?P.+?)】`, "mg");
static inline_al_delimiter_open_regular = ctRegex!(`【\s`, "m");
static inline_al_delimiter_open_symbol_star = ctRegex!(`【[*]\s`, "m");
@@ -625,13 +626,14 @@ static inline_image = ctRegex!(`(?P┥)☼(?P┥)☼(?P(?P
[a-zA-Z0-9._-]+?\.(?:jpg|gif|png)),w(?P0)h(?P0))\s*(?P.*?┝┤.*?├)`, "mg");
static inline_image_info = ctRegex!(`☼?(?P
[a-zA-Z0-9._-]+?\.(?:jpg|gif|png)),w(?P\d+)h(?P\d+)`, "mg");
static inline_link_anchor = ctRegex!(`┃(?P\S+?)┃`, "mg"); // TODO *~text_link_anchor
-static inline_link = ctRegex!(`┥(?P.+?)┝┤(?P#?(\S+?))├`, "mg");
-static inline_link_empty = ctRegex!(`┥(?P.+?)┝┤├`, "mg");
-static inline_link_number = ctRegex!(`┥(?P.+?)┝┤(?P[0-9]+)├`, "mg"); // not used
-static inline_link_number_only = ctRegex!(`(?P┥.+?┝)┤(?P[0-9]+)├`, "mg");
-static inline_link_stow_uri = ctRegex!(`┥(?P.+?)┝┤(?P[^ 0-9#┥┝┤├][^ 0-9┥┝┤├]+)├`, "mg"); // will not stow (stowed links) or object number internal links
-static inline_link_hash = ctRegex!(`┥(?P.+?)┝┤(?P#(?P\S+?))├`, "mg");
-static inline_link_seg_and_hash = ctRegex!(`┥(?P.+?)┝┤(?P(?P[^/#├]*)#(?P.+?))├`, "mg");
+// space cleaning should not be necessary
+static inline_link = ctRegex!(`┥\s*(?P.+?)\s*┝┤(?P#?(\S+?))├`, "mg");
+static inline_link_empty = ctRegex!(`┥\s*(?P.+?)\s*┝┤├`, "mg");
+static inline_link_number = ctRegex!(`┥\s*(?P.+?)\s*┝┤(?P[0-9]+)├`, "mg"); // not used
+static inline_link_number_only = ctRegex!(`\s*(?P\s*┥.+?┝)┤(?P[0-9]+)├`, "mg");
+static inline_link_stow_uri = ctRegex!(`┥\s*(?P.+?)\s*┝┤(?P[^ 0-9#┥┝┤├][^ 0-9┥┝┤├]+)├`, "mg"); // will not stow (stowed links) or object number internal links
+static inline_link_hash = ctRegex!(`┥\s*(?P.+?)\s*┝┤(?P#(?P\S+?))├`, "mg");
+static inline_link_seg_and_hash = ctRegex!(`┥\s*(?P.+?)\s*┝┤(?P(?P[^/#├]*)#(?P.+?))├`, "mg");
static inline_link_clean = ctRegex!(`┤(?:.+?)├|[┥┝]`, "mg");
static inline_link_toc_to_backmatter = ctRegex!(`┤#(?Pendnotes|bibliography|bookindex|glossary|blurb)├`, "mg");
static url = ctRegex!(`https?://`, "mg");
diff --git a/org/ocda.org b/org/ocda.org
index d03d1cc..96fe139 100644
--- a/org/ocda.org
+++ b/org/ocda.org
@@ -972,7 +972,7 @@ ST_endnotes en_st = note_section.backmatter_endnote_objects(obj_cite_digits, opt
}
{ // document segnames
ST_segnames get_segnames;
- get_segnames = the_document_body_section.after_doc_determine_segnames(the_document_endnotes_section, the_document_glossary_section, the_document_bibliography_section, the_document_bookindex_section, the_document_blurb_section, segnames, html_segnames_ptr_cntr, html_segnames_ptr); //
+ get_segnames = the_document_body_section.after_doc_determine_segnames(the_document_endnotes_section, the_document_glossary_section, the_document_bibliography_section, the_document_bookindex_section, the_document_blurb_section, segnames, html_segnames_ptr_cntr, html_segnames_ptr);
segnames = get_segnames.segnames;
html_segnames_ptr_cntr = get_segnames.html_segnames_ptr_cntr;
html_segnames_ptr = get_segnames.html_segnames_ptr;
@@ -1409,36 +1409,42 @@ string[][string] document_section_keys_sequenced = [
"scroll": ["head", "toc", "body",],
"seg": ["head", "toc", "body",],
"sql": ["head", "body",],
- "latex": ["head", "toc", "body",]
+ "latex": ["head", "toc", "body",],
+ "text": ["head", "toc", "body",],
];
if (document_the["endnotes"].length > 1) {
document_section_keys_sequenced["scroll"] ~= "endnotes";
document_section_keys_sequenced["seg"] ~= "endnotes";
document_section_keys_sequenced["latex"] ~= "endnotes";
+ document_section_keys_sequenced["text"] ~= "endnotes";
}
if (document_the["glossary"].length > 1) {
document_section_keys_sequenced["scroll"] ~= "glossary";
document_section_keys_sequenced["seg"] ~= "glossary";
document_section_keys_sequenced["sql"] ~= "glossary";
document_section_keys_sequenced["latex"] ~= "glossary";
+ document_section_keys_sequenced["text"] ~= "glossary";
}
if (document_the["bibliography"].length > 1) {
document_section_keys_sequenced["scroll"] ~= "bibliography";
document_section_keys_sequenced["seg"] ~= "bibliography";
document_section_keys_sequenced["sql"] ~= "bibliography";
document_section_keys_sequenced["latex"] ~= "bibliography";
+ document_section_keys_sequenced["text"] ~= "bibliography";
}
if (document_the["bookindex"].length > 1) {
document_section_keys_sequenced["scroll"] ~= "bookindex";
document_section_keys_sequenced["seg"] ~= "bookindex";
document_section_keys_sequenced["sql"] ~= "bookindex";
document_section_keys_sequenced["latex"] ~= "bookindex";
+ document_section_keys_sequenced["text"] ~= "bookindex";
}
if (document_the["blurb"].length > 1) {
document_section_keys_sequenced["scroll"] ~= "blurb";
document_section_keys_sequenced["seg"] ~= "blurb";
document_section_keys_sequenced["sql"] ~= "blurb";
document_section_keys_sequenced["latex"] ~= "blurb";
+ document_section_keys_sequenced["text"] ~= "blurb";
}
if ((opt_action.html)
|| (opt_action.html_scroll)
diff --git a/org/ocda_functions.org b/org/ocda_functions.org
index 90574f4..cba37b9 100644
--- a/org/ocda_functions.org
+++ b/org/ocda_functions.org
@@ -2747,10 +2747,8 @@ static struct ObjInlineMarkup {
CMM conf_make_meta,
Flag!"_new_doc" _new_doc
) {
- obj_txt["munge"] = obj_[obj_key_].dup;
- obj_txt["munge"] = (obj_["is"].match(ctRegex!(`verse|code`)))
- ? obj_txt["munge"]
- : obj_txt["munge"].strip;
+ obj_txt["munge"] = obj_[obj_key_].dup;
+ obj_txt["munge"] = (obj_["is"].match(ctRegex!(`verse|code`))) ? obj_txt["munge"] : obj_txt["munge"].strip;
if (_new_doc) {
anchor_tag = "";
}
@@ -2769,8 +2767,8 @@ static struct ObjInlineMarkup {
|| (obj_["is"] == "group")
|| (obj_["is"] == "block")
|| (obj_["is"] == "verse")) {
- obj_txt["munge"] = (obj_txt["munge"]).inline_markup_faces;
- obj_txt["munge"] = (obj_txt["munge"]).links_and_images;
+ obj_txt["munge"] = (obj_txt["munge"]).inline_markup_faces;
+ obj_txt["munge"] = (obj_txt["munge"]).links_and_images;
}
switch (obj_["is"]) {
case "heading":
@@ -3553,8 +3551,8 @@ ubyte[32] obj_digest()(
// ↓ - endnotes
struct NotesSection {
string[string] object_notes;
- int previous_count;
- int mkn;
+ int previous_count;
+ int mkn;
static auto rgx = RgxI();
private auto gather_notes_for_endnote_section(
ObjGenericComposite[] contents_am,
@@ -5652,6 +5650,9 @@ auto docSectKeysSeq(string[][string] document_section_keys_sequenced) {
string[] latex() {
return document_section_keys_sequenced["latex"];
}
+ string[] text() {
+ return document_section_keys_sequenced["text"];
+ }
}
return doc_sect_keys_seq();
}
diff --git a/org/out_metadata.org b/org/out_metadata.org
index 5a7e579..d92ff92 100644
--- a/org/out_metadata.org
+++ b/org/out_metadata.org
@@ -83,6 +83,7 @@ if (doc_matters.opt.action.debug_do) {
}
auto pth_html = spinePathsHTML!()(doc_matters.output_path, doc_matters.src.language);
auto pth_epub = spinePathsEPUB!()(doc_matters.output_path, doc_matters.src.language);
+auto pth_text = spinePathsText!()(doc_matters);
auto pth_pdf = spinePathsPDF!()(doc_matters);
auto pth_pod = spinePathsPods!()(doc_matters);
metadata_ ~= format(q"┃
@@ -164,6 +165,10 @@ if ((doc_matters.opt.action.html_link_pdf) || (doc_matters.opt.action.html_link_
~ "." ~ doc_matters.src.language ~ ".letter.portrait.pdf\" class=\"lnkicon\">"
~ " □ pdf (U.S. letter) ] ";
}
+if (doc_matters.opt.action.html_link_text) {
+ metadata_ ~= " ["
+ ~ " □ txt ] ";
+}
metadata_ ~= "