diff options
Diffstat (limited to 'org/ocda_functions.org')
-rw-r--r-- | org/ocda_functions.org | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/org/ocda_functions.org b/org/ocda_functions.org index cba37b9..16de3f0 100644 --- a/org/ocda_functions.org +++ b/org/ocda_functions.org @@ -4453,11 +4453,31 @@ ST_the_section build_the_blurb_section(Opt) ( int html_segnames_ptr_cntr, int html_segnames_ptr, ) { + string[string][string] notes_; + if (the_document_body_section.length > 1) { + string _notes; + foreach (ref obj; the_document_body_section) { + if (obj.has.inline_notes_reg) { + if ((obj.text).matchFirst(rgx.inline_notes_al_gen)) { + foreach (m; (obj.text).matchAll(rgx.inline_notes_al_regular_number_note)) { + _notes ~= "\n\n" ~ m["num"] ~ ". " ~ m["note"] ~ " ≫" ~ obj.metainfo.ocn.to!string; + notes_[(m["num"])]["ocn"] = obj.metainfo.ocn.to!string; + } + } + } + } + } if (the_document_endnotes_section.length > 1) { segnames["html"] ~= "endnotes"; segnames["epub"] ~= "endnotes"; html_segnames_ptr = html_segnames_ptr_cntr; foreach (ref obj; the_document_endnotes_section) { + auto matches = (obj.text).matchAll(rgx.endnote_section_note); + foreach (m; matches) { + obj.text = m.hit ~ " ≫" ~ notes_[(m["notenumber"])]["ocn"]; + } + } + foreach (ref obj; the_document_endnotes_section) { if (obj.metainfo.is_a == "heading") { obj.metainfo.parent_ocn = obj.metainfo.markedup_ancestors[obj.metainfo.parent_lev_markup]; } |