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

pluginInfo tab content nested <p> can be removed #7355

Open
cdruan opened this issue Mar 12, 2023 · 2 comments
Open

pluginInfo tab content nested <p> can be removed #7355

cdruan opened this issue Mar 12, 2023 · 2 comments

Comments

@cdruan
Copy link
Contributor

cdruan commented Mar 12, 2023

If you use a browser's inspect tool, you'll see every tab content of a plugin-info view begins with nested <p>. The outer <p> can be removed by adding extra blank line after each <$transclude> in $:/core/ui/PluginInfo:

\whitespace trim
<$transclude tiddler=<<localised-info-tiddler-title>> mode="block">

<$transclude tiddler=<<currentTiddler>> subtiddler=<<localised-info-tiddler-title>> mode="block">

<$transclude tiddler=<<currentTiddler>> subtiddler=<<info-tiddler-title>> mode="block">

<$transclude tiddler=<<default-tiddler-title>> mode="block">

{{$:/language/ControlPanel/Plugin/NoInfoFound/Hint}}
</$transclude>
</$transclude>
</$transclude>
</$transclude>
@pmario
Copy link
Member

pmario commented Mar 12, 2023

There is a problem in the paragraph detection of the parser. Usually the rule is: If there are 2 new-lines there should be a P tag. In this case it's the other way around. Which clearly shows that there is problem in the detection logic.


I did dig it down.

see: #7061 The draft PR contains a lot of files, but only the 1st core/modules/parsers/wikiparser/wikiparser.js contains a possible fix.

The others are reminders, which tiddlers may be affected by the parser change.

@cdruan
Copy link
Contributor Author

cdruan commented Mar 12, 2023

Usually the rule is: If there are 2 new-lines there should be a P tag. In this case it's the other way around. Which clearly shows that there is problem in the detection logic.

I think the outer p tag stems from the <$transclude> tag being treated as an inline element when it is not followed by a blank line (two line breaks), as described in TW5 doc:

To get the content of an HTML element (including widgets) to be parsed in block mode, the opening tag must be followed by two linebreaks.

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

2 participants