Spacing in ordered lists in Markdown Tiddlers

214 views
Skip to first unread message

Andy Pastuszak

unread,
Apr 8, 2021, 7:28:24 AM4/8/21
to TiddlyWiki

When I create ordered lists in markdown tiddlers, I get a space between each item in the ordered lists.

Creating ordered lists using TW5 does not create these spaces.

My Markdown looks like this:

1. List Item 1
2. List Item 2
3. List Item 3

My TW5 looks like this:

# List Item 1
# List Item 2
# List Item 3

Javier Eduardo Rojas Romero

unread,
Apr 9, 2021, 5:47:30 PM4/9/21
to tiddl...@googlegroups.com
The HTML code generated by markdown is different from the one generated
by TiddlyWiki's default wikitext language. In particular, for those list
items, tiddlywiki's native yields:

<ol>
<li>List Item 1</li>
...
</ol>

But when using markdown it yields (notice the additional paragraph <p>
tag):

<ol>
<li><p>List Item 1</p></li>
...
</ol>

And, since paragraphs in tiddlywiki have margins on their top and their
bottom, you see those spaces.

(Just in case, I was able to see all of that by using the browser
developer tools: put your mouse cursor over the part of the page you want to
check, then right click, and choose "Inspect" (or "Inspect Element"), and check
the HTML code you'll see)

I don't know if those differences are intentional, or a bug in the
markdown plugin, or a fundamental difference in markdown/tiddlywiki
formats. I would reach out to the plugin author and ask them about this
apparent inconsistency.

That said, I suggest the following to "solve" the issue: tell tiddlywiki
to not put margins in paragraphs that live inside lists. You can do that
by adding a CSS declaration specifying what I said before.

As per https://tiddlywiki.com/#Using%20Stylesheets , to do that:

Create a new tiddler; its title doesn't matter. It should have the tag
$:/tags/Stylesheet , and the following content (minus the %%%%% markers
of course):

%%%%%%%%%%%%%%%%%%%% TIDDLER CONTENT START %%%%%%%%%%%%%%%%%%%%%%%%%%%%
li p {
margin: 0;
}
%%%%%%%%%%%%%%%%%%%%% TIDDLER CONTENT END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> --
> You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7973e834-4e6a-4f79-94c4-b24866c4bdf0n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages