diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-25 20:49:49 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-10-02 21:38:04 -0400 |
| commit | 8a3a66e3f0ff4f031c2918f4501b6a05ab05a06f (patch) | |
| tree | 5806e6f817825b84be1ca22cdf6254347962d115 /dlang | |
| parent | docs: the repository is sisudoc-ocda-lib (diff) | |
style: restore the comment arrows, double-encoded by an edit
The /+ ↓ +/ arrows had each of their three UTF-8 bytes re-encoded as
UTF-8 in turn, by an in-place edit that read the file as latin-1. 13
comments in load_ssp.d. Comment text only; the parser is unchanged and
the agreement check still passes.
(assisted by Claude-Code)
Diffstat (limited to 'dlang')
| -rw-r--r-- | dlang/src/ocda/load_ssp.d | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/dlang/src/ocda/load_ssp.d b/dlang/src/ocda/load_ssp.d index ccaa0f4..83e3572 100644 --- a/dlang/src/ocda/load_ssp.d +++ b/dlang/src/ocda/load_ssp.d @@ -27,7 +27,7 @@ OcdaDocument parseSsp(string content) { string current_block = ""; // meta, make, doc_has, or section name foreach (line; content.splitter("\n")) { - /+ â comment. The first line of a .ssp declares the format version, and + /+ ↓ comment. The first line of a .ssp declares the format version, and it is the one comment that carries meaning: a reader checks the major part and refuses what it does not know rather than loading an unfamiliar artefact half populated in silence. @@ -43,7 +43,7 @@ OcdaDocument parseSsp(string content) { continue; } - /+ â blank line - finalize current object +/ + /+ ↓ blank line - finalize current object +/ if (line.length == 0 || line.strip.length == 0) { if (in_object) { commitObject(doc, current_section, current_obj); @@ -54,7 +54,7 @@ OcdaDocument parseSsp(string content) { continue; } - /+ â section/block open +/ + /+ ↓ section/block open +/ if (line[0] == '@') { auto brace_pos = line.indexOf('{'); if (brace_pos > 0) { @@ -62,7 +62,7 @@ OcdaDocument parseSsp(string content) { current_block = name; if (!isPreambleBlock(name)) { current_section = name; - /+ â a block that is neither preamble nor a section this reader + /+ ↓ a block that is neither preamble nor a section this reader knows: counted, so that --report-unknown can say so +/ if (doc.sectionByName(name) is null) { doc.unknown.block[name]++; @@ -72,7 +72,7 @@ OcdaDocument parseSsp(string content) { continue; } - /+ â section/block close +/ + /+ ↓ section/block close +/ if (line[0] == '}') { if (in_object) { commitObject(doc, current_section, current_obj); @@ -84,7 +84,7 @@ OcdaDocument parseSsp(string content) { continue; } - /+ â inside meta/make/doc_has blocks: key-value pairs +/ + /+ ↓ inside meta/make/doc_has blocks: key-value pairs +/ if (isPreambleBlock(current_block)) { string stripped = line.stripLeft; auto colon_pos = stripped.indexOf(':'); @@ -100,7 +100,7 @@ OcdaDocument parseSsp(string content) { continue; } - /+ â object declaration: [N] type ... +/ + /+ ↓ object declaration: [N] type ... +/ if (line[0] == '[') { if (in_object) { commitObject(doc, current_section, current_obj); @@ -113,7 +113,7 @@ OcdaDocument parseSsp(string content) { continue; } - /+ â property: .name: value +/ + /+ ↓ property: .name: value +/ if (line[0] == '.') { if (in_object) { parseProperty(line, current_obj, doc.unknown); @@ -121,7 +121,7 @@ OcdaDocument parseSsp(string content) { continue; } - /+ â text content: | content +/ + /+ ↓ text content: | content +/ if (line.length >= 1 && line[0] == '|') { if (in_object) { string text_content = (line.length > 2) ? line[2 .. $] : ""; @@ -135,13 +135,13 @@ OcdaDocument parseSsp(string content) { continue; } - /+ â no known shape. Counted by its first character so that a reader + /+ ↓ no known shape. Counted by its first character so that a reader can be told the file held something this one did not expect +/ doc.unknown.line[line[0 .. 1].idup]++; } - /+ â finalize last object +/ + /+ ↓ finalize last object +/ if (in_object) { commitObject(doc, current_section, current_obj); } @@ -179,7 +179,7 @@ private void parseObjectDeclaration(string line, ref OcdaObject obj) { } } -/+ â the blocks that are document preamble rather than sections of objects +/ +/+ ↓ the blocks that are document preamble rather than sections of objects +/ private bool isPreambleBlock(string name) { return name == "source" || name == "meta" || name == "make" || name == "doc_has"; } @@ -236,7 +236,7 @@ private void parseProperty(string line, ref OcdaObject obj, ref OcdaUnknown unkn case "heading_ancestors_text": obj.heading_ancestors_text = value; break; case "sha256": obj.sha256 = value; break; case "image": obj.images ~= parseImageRecord(value); break; - /+ â a property this reader has no use for, or has never heard of. + /+ ↓ a property this reader has no use for, or has never heard of. Ignored, which is the conforming behaviour within a major version, but counted rather than passed over in silence +/ |
