aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-04-22 14:06:31 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-04-22 20:42:31 -0400
commite292f03817f4bf307b2cc6e35bd81b7fe2d33717 (patch)
treeb2ae5588242cf7f8525e80d2d9610d41372b1971 /src
parent.ssp: add .children property for heading tree navigation (diff)
.ssp: omit empty-value array property entries
Add empty-string guards to array property loops (.stow_link, .lev4_subtoc, .anchor_tag) so entries with zero-length values are not emitted. Empty properties have no value for PEG parsing - absent lines are faster to skip than matching a property name to find an empty value. Removes 1488 empty .anchor_tag: lines from Wealth of Networks .ssp alone. Co-Authored-By: Anthropic Claude Opus 4.6 (1M context)
Diffstat (limited to 'src')
-rw-r--r--src/sisudoc/io_out/create_abstraction_txt.d9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sisudoc/io_out/create_abstraction_txt.d b/src/sisudoc/io_out/create_abstraction_txt.d
index d393f61..f92b83c 100644
--- a/src/sisudoc/io_out/create_abstraction_txt.d
+++ b/src/sisudoc/io_out/create_abstraction_txt.d
@@ -359,7 +359,8 @@ template spineAbstractionTxt() {
/+ ↓ stow (extracted links) +/
if (obj.stow.link.length > 0) {
foreach (lnk; obj.stow.link) {
- output ~= ".stow_link: " ~ lnk;
+ if (lnk.length > 0)
+ output ~= ".stow_link: " ~ lnk;
}
}
@@ -390,13 +391,15 @@ template spineAbstractionTxt() {
/+ ↓ lev4 subtoc +/
if (obj.tags.lev4_subtoc.length > 0) {
foreach (st; obj.tags.lev4_subtoc) {
- output ~= ".lev4_subtoc: " ~ st;
+ if (st.length > 0)
+ output ~= ".lev4_subtoc: " ~ st;
}
}
/+ ↓ anchor tags +/
if (obj.tags.anchor_tags.length > 0) {
foreach (at; obj.tags.anchor_tags) {
- output ~= ".anchor_tag: " ~ at;
+ if (at.length > 0)
+ output ~= ".anchor_tag: " ~ at;
}
}