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

[BUG] Markdown in widgets doesn't work unless surrounded by blank lines #8920

Open
jn64 opened this issue Jan 30, 2025 · 0 comments
Open

[BUG] Markdown in widgets doesn't work unless surrounded by blank lines #8920

jn64 opened this issue Jan 30, 2025 · 0 comments

Comments

@jn64
Copy link

jn64 commented Jan 30, 2025

Describe the bug

Markdown in widgets doesn't work unless surrounded by blank lines.

Expected behavior

Inline Markdown should work in widgets as it does outside of widgets.

To Reproduce

Copy and paste following code block into a new tiddler with type text/markdown on https://tiddlywiki.com/plugins/tiddlywiki/markdown/

## 1. One line

<$list filter="[title[HelloThere]]">~~<$link/>~~</$list>

## 2. Own line

<$list filter="[title[HelloThere]]">
~~<$link/>~~
</$list>

## 3. Blank lines

<$list filter="[title[HelloThere]]">

~~<$link/>~~

</$list>

## 4. Blank line after

<$list filter="[title[HelloThere]]">
~~<$link/>~~

</$list>

## 5. Blank line before

<$list filter="[title[HelloThere]]">

~~<$link/>~~
</$list>

Result

Only example 3 works (Markdown surrounded by blank lines), but adds unwanted paragraph <p>, making it unsuitable for uses like TaskManagementExample (the checkbox and "Go to Mordor" would be on different lines).

1, 2, 4 don't work (~~ is printed literally).

5 works for the Markdown, but breaks the rest of the widget output.

Strikethrough ~~ was chosen as it's more obvious visually. Bold ** __ and italics * _ are also affected.

Screenshots

Screenshot

TiddlyWiki Configuration

TiddlyWiki 5.3.6
Included Markdown plugin
Node.js 22.11.0

All relevant parser settings in TW and Markdown plugin are default.

Additional context

All 5 examples work if the tiddler has type text/vnd.tiddlywiki (or blank).

Workaround for Markdown tiddlers

Use HTML in the widget (e.g. <s> for strikethrough):

<$list filter="[title[HelloThere]]"><s><$link/></s></$list>

For TaskManagementExample:

<$list filter="[!has[draft.of]tag[task]tag[done]sort[created]]">
<$checkbox tag="done"> <s><$link/></s></$checkbox>
</$list>
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

No branches or pull requests

1 participant