Skip to content

Fix raw slice of a nested Jinja block missing its opening tag - #254

Merged
g-plane merged 1 commit into
g-plane:mainfrom
UnknownPlatypus:fix-nested-jinja-block-raw
Sep 1, 2026
Merged

g-plane merged 1 commit into
g-plane:mainfrom
UnknownPlatypus:fix-nested-jinja-block-raw

Conversation

@UnknownPlatypus

Copy link
Copy Markdown
Contributor

Fixes #253

  • The pull request description was written manually by me and was not generated by an AI tool or agent.
  • I have read and understood the relevant parts of the existing codebase before making these changes.
  • I have carefully reviewed and understood all code changes, and ensured that they match the style, architecture, and conventions of the existing codebase.
  • I understand that pull requests containing blindly generated or unreviewed AI-generated code may be closed without review.

A nested block reached from a parent block's children loop had its opening
tag consumed before the start offset was recorded, so `Node::raw` began
after it. Raw content printing ({% raw %} blocks, ignore directives) emits
`raw` verbatim, which dropped the opening tag and made formatting unstable.
@netlify

netlify Bot commented Aug 23, 2026

Copy link
Copy Markdown

Deploy Preview for markup-fmt ready!

Name Link
🔨 Latest commit 4c7825d
🔍 Latest deploy log https://app.netlify.com/projects/markup-fmt/deploys/6a8b10ef31e9e000086ee5fe
😎 Deploy Preview https://deploy-preview-254--markup-fmt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment thread markup_fmt/tests/fmt/jinja/ignore/nested-block.snap
@g-plane
g-plane merged commit fd08b0e into g-plane:main Sep 1, 2026
5 checks passed
@UnknownPlatypus
UnknownPlatypus deleted the fix-nested-jinja-block-raw branch September 1, 2026 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<!-- markup-fmt-ignore --> eat the next block opening in nested context

2 participants