Skip to content

fix: propagate custom block and middle tags into <script> and <style> modes - #132

Open
dnspfio wants to merge 1 commit into
rtts:mainfrom
dnspfio:fix-custom-middle-tags-in-js-mode
Open

fix: propagate custom block and middle tags into <script> and <style> modes#132
dnspfio wants to merge 1 commit into
rtts:mainfrom
dnspfio:fix-custom-middle-tags-in-js-mode

Conversation

@dnspfio

@dnspfio dnspfio commented Jun 29, 2026

Copy link
Copy Markdown

Fix

  • Propagate extra_blocks and extra_middle_tags from the parent mode into the DjCSS/DjJS modes spawned for <style>/<script>.

  • Remove the resets in DjJS.init so the propagated config survives.

This makes template tags inside <script>/<style> classified identically to how they're classified in HTML/text.

Tests

  • Added a regression case to tests/suite/js.html: a custom block + middle family inside <script>, plus a native {% if %}/{% else %}/{% endif %} control.

  • Fixed tests/generate_tokens.py, which wasn't passing extra_middle_tags (it was out of sync with the test suite).

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.

1 participant