Re-vendor carve-lib + block-attribute corpus + grammar precision - #26
Merged
Conversation
Completes the block-attribute-line rollout on the carve side (PART 9 §15, spec #25; carve-js renderer carve-js#22; carve-php already conformant). - docs/.vitepress/carve-lib: re-vendored from carve-js main (block-attr parser + per-block-type attr rendering). - docs/examples.md + corpus: three new Attributes fixtures -- 17-attributes-2 (single attr line -> paragraph), -3 (consecutive class accumulation), -4 (attrs on a list). All class-focused so they agree byte-for-byte across carve-js AND carve-php (verified); they avoid the separate multi-attribute render-ORDER divergence (carve-js class/id/key vs carve-php id/class/key), tracked separately. - resources/grammar.ebnf: tightens block_attributes to match BOTH reference impls -- a continuation is a single line break (+indent), and a BLANK line inside the braces ends the block (not interior padding). The earlier ws_nl form over-claimed blank-line support that neither carve-js nor carve-php implements. Adds §15 notes on the blank-line and quoted-} -across-lines (pathological, unsupported) edges. 93/93 corpus + normativity tests pass.
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.
Completes the block-attribute-line rollout on the carve side (PART 9 §15, spec #25; carve-js carve-js#22; carve-php already conformant).
17-attributes-2(single attr line → paragraph),-3(consecutive class accumulation),-4(attrs on a list). All class-focused so they agree byte-for-byte across carve-js AND carve-php (verified); they deliberately avoid the separate multi-attribute render-order divergence (carve-jsclass id keyvs carve-phpid class key), tracked separately.block_attributesto match both reference impls: a continuation is a single line break (+indent), and a blank line inside the braces ends the block (not interior padding). The earlierws_nlform over-claimed blank-line support neither impl provides. Adds §15 notes on the blank-line and quoted-}-across-lines (pathological) edges.93/93 corpus + normativity pass.