Query: The Profligate <P>??

147 views
Skip to first unread message

TiddlyTweeter

unread,
Jun 16, 2020, 6:46:22 AM6/16/20
to TiddlyWiki
I'm sure this has been commented on a zillion times already but Tiddlers always seem to be wrapped in an excess "<p>".
Anyway to stop that happening?

<p>
<p>Just a sentence.</p>
</p>

Best wishes
TT

TW Tones

unread,
Jun 16, 2020, 7:45:19 AM6/16/20
to TiddlyWiki
TT

With the internals plugin installed and the html output preview in the editor it is possibly to play and learn how it comes about.

Such research should allow you to identify the conditions when this happens, fondvworkarounds and possibly inform a solution.

Regards
TW Tones aka tonym

PMario

unread,
Jun 16, 2020, 8:54:25 AM6/16/20
to TiddlyWiki
Hi

Did you test this at tiddlywiki.com? It doesn't happen to me there with FF.

-m

TiddlyTweeter

unread,
Jun 16, 2020, 10:49:26 AM6/16/20
to TiddlyWiki
Ciao PMario

You are right! But there is still an issue sometimes.

I'll try pin it down more exactly when it occurs and rephrase the question I hope in a tighter way!

On hold for now.

Thanks!
TT

TiddlyTweeter

unread,
Jun 17, 2020, 5:07:50 AM6/17/20
to TiddlyWiki
Ciao PMario & all

Tested on tw.com on FF & Chrome under developer tools ... My central point can be illustrated ...

Enter Tiddler 1 CONTENT ...

!!! Test Level 3 Header In WIKITEXT

... RENDER is Correct (line breaks changed for easier reading) ...

<div class="tc-tiddler-body tc-reveal">
<h3 class="">Test Level 3 Header In WIKITEXT</h3>
</div>


Now for Tiddler 2 CONTENT

<h3>Test Level 3 Header In HTML</h3>

... RENDER is INcorrect, with excess <P>s

<div class="tc-tiddler-body tc-reveal">
<p><h3>Test Level 3 Header In HTML</h3></p>
</div>

It is confusing & can create layout issues??

I would like to get clearer why this happens? That using some HTML (not all) in WikiText causes not needed overall wrap in <P>? 

I am not expecting anyone to fix it. I'm not demanding. 

Just would like to better know WHY it occurs?

Best wishes,
TT

On Tuesday, 16 June 2020 14:54:25 UTC+2, PMario wrote:

PMario

unread,
Jun 17, 2020, 11:25:23 AM6/17/20
to TiddlyWiki
On Wednesday, June 17, 2020 at 11:07:50 AM UTC+2, TiddlyTweeter wrote:
 
Now for Tiddler 2 CONTENT

<h3>Test Level 3 Header In HTML</h3>

... RENDER is INcorrect, with excess <P>s

<div class="tc-tiddler-body tc-reveal">
<p><h3>Test Level 3 Header In HTML</h3></p>
</div>

It is confusing & can create layout issues??

You are absolutely right. Not only does it create layout problems, it also creates html-code, that is "out of" html spec. (This isn't a real problem for most users, since browsers are very forgiving rendering "spec violations").

Eg: a paragrph <p> tag "should" only contain "phrasing content". As you can see: headings <h> are _no_ phrasing content. Paragraphs are phrasing content. ... They should not even contain <p> childs.

As you found out this can cause all sorts of problems. Theming isn't the most problematic. There are others too.

There is a PR at github: Improve p generation. from githubuser: nilslindeman, which seems to have done a "deep dive" into exactly this problem, we introduced with the TW wikitext-parser.

In the PR Nils discusses the problems the existing behaviour creates and a possible solution. In a response from Oct. 2019 Jeremy wrote:

One of the problems in this area is that any improvements will inevitably break backwards compatibility, because that's rather the point: this is a situation where we explicitly want to change the current behaviour.

The important point for me here is: "this is a situation where we explicitly want to change the current behaviour". ... But ... There still is TWs "backwards compatibility" paradigm, which is mentioned in the same sentence.

The GH discussion also mentions Arlen's PR, which did have a different "take" and didn't get far enough for Nils.

As you can see, the PR is stalled since Nov.2019... I think the main reason is, that Nils is OK with his own branch. (That's my personal guess only)

There is the "last" statement from Nils: https://github.com/Jermolene/TiddlyWiki5/pull/4290#issuecomment-546708220 which (for me) point out, that the whole thing wouldn't hurt backwards compatibility. It will fix the bugs.

We would need to compare the "static" output created with TW node version and the output created by Nils's feature branch. ... So we can see the differences.

IMO the PR is stalled, because nobody bumped it since then. ... So you may be the one?

have fun!
mario

TiddlyTweeter

unread,
Jun 17, 2020, 2:15:50 PM6/17/20
to TiddlyWiki
Looking at the thread ... https://github.com/Jermolene/TiddlyWiki5/pull/4290#issuecomment-546708220 I had deja-vu.
I realized I commented on it before! I had forgotten!

I will again.

TT

TiddlyTweeter

unread,
Jun 17, 2020, 5:23:29 PM6/17/20
to TiddlyWiki
I now wrote this on Github at https://github.com/Jermolene/TiddlyWiki5/pull/4290#issuecomment-645625262

I just commented on GG about this again at: [The Profligate "P"](https://groups.google.com/d/msg/tiddlywiki/YGRzd6fd8q0/GjFEmh-3BwAJ).
 
Any movement?
 
If this can't be fixed I think it should at least be **Documented!** Undocumented I am sure its causing problems that _users won't understand_. I myself only stumbled on it by accident when a precise CSS cascade stopped working because I wrote ```<h3>``` not ```!!!``` in a tiddler. Took hours to pin down.
 
Some resolution on this, please!

IF you use GitHub please review this issue!

It is one of the bigger unresolved issues.

TT 

Nils Lindemann

unread,
Jun 18, 2020, 5:29:34 AM6/18/20
to TiddlyWiki
Hi people,

Im reading your posts, but i am currently busy with another thing. Will write a post in a week, ok?

Greetings, Nils

Reply all
Reply to author
Forward
0 new messages