diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-04-22 14:06:31 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-04-22 20:42:31 -0400 |
| commit | e292f03817f4bf307b2cc6e35bd81b7fe2d33717 (patch) | |
| tree | b2ae5588242cf7f8525e80d2d9610d41372b1971 /org | |
| 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 'org')
| -rw-r--r-- | org/out_src_abstraction_peg_text.org | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/org/out_src_abstraction_peg_text.org b/org/out_src_abstraction_peg_text.org index 1b6517b..2f2c798 100644 --- a/org/out_src_abstraction_peg_text.org +++ b/org/out_src_abstraction_peg_text.org @@ -341,7 +341,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; } } @@ -372,13 +373,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; } } |
