feat(wrap): oliver wrap template dialect (Phase 6 S2) - #112
Merged
Merged
Conversation
…-root <prefix> --body <file> (Phase 6 S2) Implements the 7-token template dialect for `oliver wrap`: - $title$/$description$/$author$/$date$/$palette$ → html_escaped meta - $assets_root$/$body$ → literal - $if(name)$...$endif$ → conditional blocks (first $endif$ closes, no nesting, verbatim unknown) - Unknown $word$ → verbatim passthrough Closes #108 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This was referenced Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the
oliver wrapsubcommand with the 7-token template dialect (Phase 6 S2, issue #108).What's new
src/wrap.zig— Template dialect engine (filesystem-free, pure bytes → bytes)$title$/$description$/$author$/$date$/$palette$(HTML-escaped),$assets_root$/$body$(literal)$if(name)$...$endif$conditional blocks: first$endif$closes, no nesting, verbatim unknown names, empty fields remove block& < > " '→& < > " '(matches GAWKhtml_escape)std.json.parseFromSlicewithignore_unknown_fieldssrc/main.zig— CLI integrationCommand.wrapvariant and 4 wrap-specific flags (--template,--meta-json,--assets-root,--body)wrapDispatch()reads files from disk viastd.Io.Dir.cwd().openFile(), resolves dialect, writes to stdoutCLI
Contract
Matches
oliver-contract.md:115-145:$if$one-pass title→palette, first$endif$closes, no nesting, verbatim unknown$if$resolved before literal substitutionsVerification
zig build— clean compilezig build test— all tests pass (437/437)Closes #108