|
--report-unknown, added in the previous commit, found a defect on its
first run (rather than a gap): .is_of_type was among the properties
being ignored, and it is the property that says whether an object is
rendered at all.
An object of type "comment" is markup commentary. The abstraction
carries it so that nothing of the source is lost, and no output puts
it in the document. This reader was putting it in three of four:
a comment appeared in the HTML scroll, in the breadcrumbed plain
text, and as an embedding chunk in the JSONL, where it would be
indexed as though the author had written it into the document.
Spine's own HTML for the same document has none.
The decision now lives in one place, SspObject.renders(), and the
three outputs ask it.
Five more properties parsed while here: .section, which is an
object's own section when it differs from the block it sits in;
.identifier, which a non-heading carries when it has one that is not
its ocn, and which now fills the same field a heading fills from its
declaration line; .segment_html_is; .table_aligns, which completes
the table set beside cols, widths and header; and .stow_link, which
is repeatable and accumulates.
That leaves twelve properties ignored across the markup document
samples, down from eighteen, and each for a reason now written
into the README: level bookkeeping this reader does not need, naming
for segmented HTML and EPUB output it does not produce, and .attrib
at one occurrence in all the samples.
(assisted by Claude-Code)
|
|
The reader as it stood when the format reached 2.0, in D: a parser of
the .ssp with no dependency beyond phobos, and outputs from it - a
heading tree, an html scroll, breadcrumbed text, chunked jsonl for
embedding pipelines, an image manifest, and a check of image records
against the images on disk.
Brought to abstraction format 2.0, and made able to say what it does
not understand, so a reader can check that its format specification is
complete. Previously the reader ignored what it did not recognise and
reported nothing, which made it seem it had understood a 2.0 file (and
drop things in silence).
Now:
- the banner is read, and the major part checked. A major this
reader does not know is refused, exit 3, because an unknown major
means a property may have changed meaning or gone away and loading
it half populated in silence is the failure the check exists to
prevent. --any-version reads it regardless, for looking at a file
rather than trusting one. A file with no banner warns and is read.
- @source is a preamble block beside @meta, @make and @doc_has, and
the summary line shows the language and the markup digest.
- tail is a section like the rest.
- --report-unknown lists every property, block and line shape met and
not understood, with counts. Ignoring them remains the conforming
behaviour within a major version; the counting is so that it is not
silent.
Over the markup document samples that report names 18 properties,
from .is_of_type at 56,882 occurrences down to .attrib at
1. Several are legitimately of no interest to a renderer and several
are not. Deciding which is which is the next pass, and it now has a
measured work list rather than a guess.
(assisted by Claude-Code)
|