From 36d0935c9a7521a87929d676a6b657fb033c44eb Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 30 Sep 2026 14:32:03 -0400 Subject: notes: editor's notes, ~[* ]~ & ~[+ ]~, as series The markup documents ~[* note ]~ and ~[+ note ]~ as editor's notes, each a separately numbered series, and a bare ~[ note ]~ which sisu put in the asterisk series. They are included as notes. Each series is numbered through the document, *1, *2 ... and +1, +2 ..., apart from the author's notes. (assisted by Claude-Code) --- org/default_regex.org | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'org/default_regex.org') diff --git a/org/default_regex.org b/org/default_regex.org index 4b2178c..33707c4 100644 --- a/org/default_regex.org +++ b/org/default_regex.org @@ -315,6 +315,7 @@ static inline_notes_curly_gen = ctRegex!(`~\{.+?\}~`, "m"); static inline_notes_curly = ctRegex!(`~\{\s*(.+?)\s*\}~`, "mg"); static inline_notes_curly_sp_asterisk = ctRegex!(`~\{[*]+\s+(.+?)\s*\}~`, "m"); static inline_notes_curly_sp_plus = ctRegex!(`~\{[+]+\s+(.+?)\s*\}~`, "m"); +static inline_notes_square = ctRegex!(`~\[\s*(?P[*+]?)\s*(?P.+?)\s*\]~`, "mg"); // editor's notes, their own numbered series static note_ref = ctRegex!(`^\S+?noteref_(?P[0-9]+)`, "mg"); // {^{73.}^}#noteref_73 #+END_SRC @@ -612,17 +613,17 @@ static inline_underscore_line = ctRegex!(`^__ (?P.+?)(?P #+NAME: prgmkup_rgx_internal_footnotes_and_endnotes #+BEGIN_SRC d /+ inline markup footnotes endnotes +/ -static inline_notes_al = ctRegex!(`【(?:[*+]\s+|\s*)(.+?)】`, "mg"); -static inline_notes_al_special = ctRegex!(`【(?:[*+]\s+)(.+?)】`, "mg"); // TODO remove match when special footnotes are implemented +static inline_notes_al = ctRegex!(`【(?:[*+]+[0-9]*\s+|\s*)(.+?)】`, "mg"); +static inline_notes_al_special = ctRegex!(`【(?:[*+]+[0-9]*\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*】`, "mg"); +static inline_notes_al_all_note = ctRegex!(`【(?P\d+|[*+]+[0-9]*)\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_notes_al_special_char_note = ctRegex!(`【(?P[*+]+[0-9]*)\s+(?P.+?)】`, "mg"); static inline_al_delimiter_open_regular = ctRegex!(`【\s`, "m"); static inline_al_delimiter_open_symbol_star = ctRegex!(`【[*]\s`, "m"); static inline_al_delimiter_open_symbol_plus = ctRegex!(`【[+]\s`, "m"); -static inline_text_and_note_al_ = ctRegex!(`(.+?(?:【[*+]*\s+.+?】|.+))`, "mg"); +static inline_text_and_note_al_ = ctRegex!(`(.+?(?:【[*+]*[0-9]*\s+.+?】|.+))`, "mg"); static endnote_section_note = ctRegex!(`┥\s*⑆\^┨(?P\d+)\.┣\^┝┤(?P¤?.+?)├.+`, "mg"); #+END_SRC -- cgit v1.2.3