From 95f359689c5dfe3983ac6934c5c8299473f512e7 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 13 Oct 2025 15:25:37 -0400 Subject: abstraction metainfo, provide endnote parent ocn - preferable, endnote parent object number available for use (as here in text output, compare "endnotes, add caller ocn" commit) --- src/sisudoc/io_out/rgx.d | 6 ++---- src/sisudoc/io_out/text.d | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'src/sisudoc/io_out') diff --git a/src/sisudoc/io_out/rgx.d b/src/sisudoc/io_out/rgx.d index b4bec5f..1327854 100644 --- a/src/sisudoc/io_out/rgx.d +++ b/src/sisudoc/io_out/rgx.d @@ -88,10 +88,8 @@ static template spineRgxOut() { static inline_notes_al_special = ctRegex!(`【(?:[*+]\s+)(.+?)】`, "mg"); // TODO remove match when special footnotes are implemented static inline_notes_al_gen = ctRegex!(`【.+?】`, "m"); static inline_notes_al_gen_text = ctRegex!(`【(?P.+?)】`, "m"); - 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_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*】`, "mg"); + static inline_notes_al_regular_number_note = ctRegex!(`【(?P\d+)\s+(?P.+?)\s*】`, "mg"); 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"); diff --git a/src/sisudoc/io_out/text.d b/src/sisudoc/io_out/text.d index da0e2b6..ce37310 100644 --- a/src/sisudoc/io_out/text.d +++ b/src/sisudoc/io_out/text.d @@ -309,9 +309,9 @@ template outputText() { _ocn = "「" ~ obj.metainfo.ocn.to!string ~ "」"; string _txt = obj.text; _txt = _txt - .replaceFirst(rgx.inline_link, ("$1")) + .replaceAll(rgx.inline_link, ("$1")) // consider .replaceFirst(rgx.inline_superscript, ("$1")); - _txt = special_characters_and_font_face!().general(_txt); + _txt = special_characters_and_font_face!().general(_txt) ~ " ≫" ~ obj.metainfo.parent_ocn.to!string; return _txt ~ newlines; } string bookindex(O,M)(O obj, M doc_matters) { -- cgit v1.2.3