diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-30 14:32:03 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-30 22:31:56 -0400 |
| commit | 36d0935c9a7521a87929d676a6b657fb033c44eb (patch) | |
| tree | acb1e27aa0a95691419e2b05f5623fbd4f1aac61 /org/default_regex.org | |
| parent | unused function removed (diff) | |
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)
Diffstat (limited to 'org/default_regex.org')
| -rw-r--r-- | org/default_regex.org | 11 |
1 files changed, 6 insertions, 5 deletions
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<series>[*+]?)\s*(?P<note>.+?)\s*\]~`, "mg"); // editor's notes, their own numbered series static note_ref = ctRegex!(`^\S+?noteref_(?P<ref>[0-9]+)`, "mg"); // {^{73.}^}#noteref_73 #+END_SRC @@ -612,17 +613,17 @@ static inline_underscore_line = ctRegex!(`^__ (?P<text>.+?)(?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<text>.+?)】`, "m"); -static inline_notes_al_all_note = ctRegex!(`【(?P<num>\d+|(?:[*]|[+])+)\s+(?P<note>.+?)\s*】`, "mg"); +static inline_notes_al_all_note = ctRegex!(`【(?P<num>\d+|[*+]+[0-9]*)\s+(?P<note>.+?)\s*】`, "mg"); static inline_notes_al_regular_number_note = ctRegex!(`【(?P<num>\d+)\s+(?P<note>.+?)\s*】`, "mg"); -static inline_notes_al_special_char_note = ctRegex!(`【(?P<char>(?:[*]|[+])+)\s+(?P<note>.+?)】`, "mg"); +static inline_notes_al_special_char_note = ctRegex!(`【(?P<char>[*+]+[0-9]*)\s+(?P<note>.+?)】`, "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<notenumber>\d+)\.┣\^┝┤(?P<link>¤?.+?)├.+`, "mg"); #+END_SRC |
