summaryrefslogtreecommitdiffhomepage
path: root/dlang
diff options
context:
space:
mode:
Diffstat (limited to 'dlang')
-rw-r--r--dlang/flake.lock8
-rw-r--r--dlang/src/write/epub.d2
-rw-r--r--dlang/src/write/rgx.d2
-rw-r--r--dlang/src/write/text.d8
4 files changed, 11 insertions, 9 deletions
diff --git a/dlang/flake.lock b/dlang/flake.lock
index ab89304..f2eda10 100644
--- a/dlang/flake.lock
+++ b/dlang/flake.lock
@@ -19,11 +19,11 @@
"ocda-lib": {
"flake": false,
"locked": {
- "lastModified": 1790430427,
- "narHash": "sha256-GSfZ1mJstp+rpvCvQJzPlXLPlrziV6uDa3Tvs/9b9p0=",
+ "lastModified": 1790705252,
+ "narHash": "sha256-lMPJxbVyAiMr8/yKvuRLeJgT+aGEQv0MiW9hlQLa/os=",
"ref": "refs/heads/main",
- "rev": "fda48e417435e31a3122bfa7ca563333628aed99",
- "revCount": 1,
+ "rev": "8b8a8c1b61c740528e1409a2429f7ec4403f9576",
+ "revCount": 2,
"type": "git",
"url": "git://git.sisudoc.org/tools/sisudoc-ocda-lib"
},
diff --git a/dlang/src/write/epub.d b/dlang/src/write/epub.d
index 3765267..0f3131c 100644
--- a/dlang/src/write/epub.d
+++ b/dlang/src/write/epub.d
@@ -38,7 +38,7 @@ import write.html;
import write.zip;
/+ ↓ a note's mark, a number or a run of stars or pluses +/
-private static note_mark = ctRegex!(`【(?P<num>\d+|(?:[*]|[+])+)\s`, "mg");
+private static note_mark = ctRegex!(`【(?P<num>\d+|[*+]+[0-9]*)\s`, "mg");
/+ ↓ an anchor the markup placed in the text +/
private static inline_anchor = ctRegex!(`┃(?P<anchor>\S+?)┃`, "mg");
diff --git a/dlang/src/write/rgx.d b/dlang/src/write/rgx.d
index 23c848d..f32df85 100644
--- a/dlang/src/write/rgx.d
+++ b/dlang/src/write/rgx.d
@@ -44,7 +44,7 @@ static struct Rgx {
static inline_notes_al_regular_number_note = ctRegex!(`【(?P<num>\d+)\s+(?P<note>.+?)\s*】`, "mg");
/+ ↓ and the same for a note marked with a run of stars or pluses
instead of a number, which the markup also allows +/
- 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");
/+ ↓ tables: the object's text is rows and columns in one string +/
static table_delimiter_row = ctRegex!("[ ]*\n", "mg");
diff --git a/dlang/src/write/text.d b/dlang/src/write/text.d
index 9853a7e..0ce53f8 100644
--- a/dlang/src/write/text.d
+++ b/dlang/src/write/text.d
@@ -128,9 +128,11 @@ string[] textSections(ref OcdaDocument doc) {
+/
private string objectOut(ref const OcdaObject obj) {
/+ ↓ an object with no text of its own writes nothing. A poem is such an
- object: it is a container that closes a run of verses and carries the
- *same* object number as the last of them, so writing it would put that
- number in the file twice - 15 times over in one sample. +/
+ object: a container of the verses that follow it, which are what is
+ written. Since format 2.1 it carries object number 0 and states the
+ range of its verses; before, it closed the run carrying the *same*
+ number as the last verse, and writing it put that number in the file
+ twice - 15 times over in one sample. Both forms write nothing. +/
if (obj.text.strip.length == 0) { return ""; }
/+ ↓ and a dummy heading writes nothing: it is generated furniture whose
text repeats the heading above it, and every other writer here drops