Repository navigation
Respect relaxed indentation for quoted scalar continuations in block context - #53
Merged
bourumir-wyngs merged 1 commit intoNov 6, 2026
Conversation
fridokus
added a commit
to fridokus/granit-parser
that referenced
this pull request
Nov 5, 2026
Apply the existing strict_indentation option consistently to quoted scalar continuations in block context. Default mode accepts under-indented content like PyYAML, while strict mode preserves its indentation errors, including at closing quotes. Cover single and double quotes, nested mappings and sequences, blank lines, LF/CRLF, and every parser input backend. Keep the YAML suite strict expectation for QB6E and verify the relaxed event stream. Upstream: bourumir-wyngs#53 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fridokus
force-pushed
the
fix/non-strict-quoted-continuations
branch
from
November 5, 2026 16:28
d0cb3cc to
73783de
Compare
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Default mode now accepts under-indented quoted scalar continuations in block context, matching PyYAML and ruamel.yaml. Strict mode still rejects them. The three strict quoted-scalar indentation checks now share one condition and differ only in error kind. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fridokus
force-pushed
the
fix/non-strict-quoted-continuations
branch
from
November 6, 2026 08:16
73783de to
4bbeb82
Compare
Owner
|
Looks good. Thanks for contribution |
Merged
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.
The default
strict_indentation: falseis meant to match PyYAML and ruamel.yaml, but under-indented quoted scalar continuations in block context were still rejected:PyYAML loads this as
{'foo': 'a b'}; granit-parser reportedInvalidQuotedScalarIndent.Fix
Gate that check on
strict_indentation, as the flow-context and escaped-line-break checks already are. All three now share one condition and differ only in error kind. Strict mode is unchanged.Tests
6.0.3.QB6Estays rejected in strict mode; relaxed mode now checks its events.cargo fmt --check,cargo clippy --all-targets --all-features -- -D warnings -D clippy::pedantic, andcargo test --all-featurespass.Prepared with GitHub Copilot.