Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes Text Parser being impacted by overrides to codeblock widget #7844

Merged
merged 2 commits into from Nov 20, 2023

Conversation

saqimtiaz
Copy link
Contributor

This PR fixes an issue reported in the forum where overriding the codeblock widget with a custom widget impacts transclusions and any other uses of the Text Parser.

The problem is caused by the transclude widget (and thus also by the macrocall widget which is used in the tabs macro) when used with the output type text/plain. The parser that wikifies the variable to retrieve the plain text output wraps the variable in a codeblock

This PR replaces the codeblock widget used in the Text Parser with a genesis widget with the remappable attribute set to "no", to create the codeblock widget, thus rendering it immune to custom widget overrides. A test has been added that fails before the PR is applied.

Copy link

vercel bot commented Nov 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tiddlywiki5 ✅ Ready (Inspect) Visit Preview Nov 20, 2023 8:35am

@Jermolene
Copy link
Owner

Great thanks @saqimtiaz

@Jermolene Jermolene merged commit bf8b3cf into Jermolene:master Nov 20, 2023
4 checks passed
munnox pushed a commit to munnox/TiddlyWiki5 that referenced this pull request Dec 24, 2023
…rmolene#7844)

* fix: overriding codeblock widget should not impact text parser

* fix: whitespace changes
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.

None yet

2 participants