Skip to content

Annotate the parse tree of conditional shortcuts#9927

Draft
pmario wants to merge 1 commit into
TiddlyWiki:masterfrom
pmario:feat/conditional-annotations
Draft

Annotate the parse tree of conditional shortcuts#9927
pmario wants to merge 1 commit into
TiddlyWiki:masterfrom
pmario:feat/conditional-annotations

Conversation

@pmario

@pmario pmario commented Jul 12, 2026

Copy link
Copy Markdown
Member

Make the <%if%> shortcut distinguishable from hand-written $list widgets in the parse tree.

  • Stamp isConditional on the synthesized $list widgets, following the isProcedureDefinition precedent
  • Record each elseif clause span from its marker to the end of the construct
  • Record blockContent on clause bodies that a blank line switched to block mode, so the tree can reproduce block vs inline layout
  • Note for third-party code: the new fields are purely additive; rendered output is unchanged

Part of #9908.

Make the <%if%> shortcut distinguishable from hand-written $list
widgets in the parse tree. Fixes TiddlyWiki#9910.

* Stamp isConditional on the synthesized $list widgets, following the
  isProcedureDefinition precedent
* Record each elseif clause span from its marker to the end of the
  construct
* Record blockContent on clause bodies that a blank line switched to
  block mode, so the tree can reproduce block vs inline layout
* Note for third-party code: the new fields are purely additive;
  rendered output is unchanged
@netlify

netlify Bot commented Jul 12, 2026

Copy link
Copy Markdown

Deploy Preview for tiddlywiki-previews ready!

Name Link
🔨 Latest commit 7688c0c
🔍 Latest deploy log https://app.netlify.com/projects/tiddlywiki-previews/deploys/6a5412397b240e00080c795e
😎 Deploy Preview https://deploy-preview-9927--tiddlywiki-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@github-actions

Copy link
Copy Markdown

Confirmed: pmario has already signed the Contributor License Agreement (see contributing.md)

@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown

📊 Build Size Comparison: empty.html

Branch Size
Base (master) 2492.6 KB
PR 2493.1 KB

Diff: ⬆️ Increase: +0.6 KB


✅ Change Note Status

All change notes are properly formatted and validated!

📝 $:/changenotes/5.5.0/#9910

Type: enhancement | Category: developer
Release: 5.5.0

Conditional shortcuts annotate their parse tree nodes

🔗 #9910

👥 Contributors: pmario


📖 Change Note Guidelines

Change notes help track and communicate changes effectively. See the full documentation for details.

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.

Annotate the parse tree of "conditional shortcuts"

1 participant