-
-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Status: Partially addressed in #71 — the block parsers (removeBlockByHeader, removeSkillBlocksBySource, addExcludeToWildcard) now use shared extractTomlStringValue and collectBlockLines helpers that handle single-quoted strings and blank lines within blocks.
Remaining work:
The addExcludeToWildcard function's exclude array parsing (/^(exclude\s*=\s*)\[([^\]]*)\]/) still only handles inline arrays. Multi-line TOML arrays would not be matched. This is unlikely in practice since smol-toml writes inline arrays, but could happen with hand-edited configs.
Additionally, the same pattern of line-by-line TOML manipulation exists in other files/functions that weren't touched in #71:
addTrustSource/removeTrustSourceinwriter.ts(these parse[trust]section fields, not[[skills]]blocks, so different pattern)sync.tsandinstall.tshave their own gitignore managed-names logic (duplicated fromdoctor.ts)
Consider whether a proper TOML AST approach (parse → modify → serialize) would be more maintainable long-term vs. continuing to extend line-by-line surgery.