summaryrefslogtreecommitdiffhomepage
path: root/gleam
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-09-25 20:49:49 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-09-25 20:49:49 -0400
commitead2f79ee41db99a292d763fe41f0613a74ef7b3 (patch)
treef8ee798e50161aa30b650db7a531f174672d08cb /gleam
parent--validate, and a second reader, in Gleam (diff)
a blank first text line was being lost
An object whose first text line is blank lost it. The parser decided whether to start a new line by asking whether the accumulated text was empty, which is not the same question as whether a text line has been seen: for an object opening on a blank line the first line left the text empty and the second overwrote it rather than appending. Seven documents of the markup document samples have verse opening on a blank line, and in every one of them the blank was dropped, so the html, the plain text and the JSONL chunks all began the verse a line early. Spine's own text output has the blank line; this now matches. Found by loading one document as .ssp and as .ocda.db and comparing the two models object by object, which is what sisudoc-ocda-lib exists to do. The comparison between the two .ssp readers had not caught it, being on section counts, which the defect does not disturb. Also: the repository is named sisudoc-ssp-reader, prefixed as every repository of this project's own is (binary, package and module names are unchanged), and the sources follow the specification directory's name, sisudoc-abstraction-format. And the /+ ↓ +/ comment arrows in ssp_parser.d, double-encoded by the in-place edit that applied the fix, are restored; comment text only. (assisted by Claude-Code)
Diffstat (limited to 'gleam')
-rw-r--r--gleam/README.md2
-rw-r--r--gleam/src/ssp/types.gleam2
-rw-r--r--gleam/src/ssp_reader.gleam2
3 files changed, 3 insertions, 3 deletions
diff --git a/gleam/README.md b/gleam/README.md
index 32d4cf7..d41135a 100644
--- a/gleam/README.md
+++ b/gleam/README.md
@@ -6,7 +6,7 @@ and says what it found and what it did not understand.
**Written from the specification alone**, as an experiment in whether that
specification suffices:
-- `ssp-format-specification.md`, from the **doc-abstraction-format**
+- `ssp-format-specification.md`, from the **sisudoc-abstraction-format**
specification
- `ocda-model.md`, from the same
diff --git a/gleam/src/ssp/types.gleam b/gleam/src/ssp/types.gleam
index 1e98886..a90559b 100644
--- a/gleam/src/ssp/types.gleam
+++ b/gleam/src/ssp/types.gleam
@@ -1,6 +1,6 @@
//// The .ssp document abstraction, as Gleam types.
////
-//// Written from the doc-abstraction-format specification,
+//// Written from the sisudoc-abstraction-format specification,
//// ssp-format-specification.md and ocda-model.md, and from nothing else: the exercise is to find out
//// whether the specification suffices to write a reader from.
diff --git a/gleam/src/ssp_reader.gleam b/gleam/src/ssp_reader.gleam
index d8c4c78..5c79d95 100644
--- a/gleam/src/ssp_reader.gleam
+++ b/gleam/src/ssp_reader.gleam
@@ -4,7 +4,7 @@
//// and says what it found and what it did not understand.
////
//// Written from the specification alone:
-//// ssp-format-specification.md, of the doc-abstraction-format spec
+//// ssp-format-specification.md, of the sisudoc-abstraction-format spec
//// ocda-model.md, of the same
import argv