-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
WIP Improve redundant p tags #7061
base: master
Are you sure you want to change the base?
Conversation
I think I did identify the main problem, which imo is in the WikiParser
|
The simplest example I could come up with is as follows. None of them should have a P tag around them.
tiddlywiki.com shows:The demo wiki showsI'm sure I did not get all the exceptions but the improvement is significant |
This PR is related to: #6156 |
The related issues to the change in the parse can be grouped in two point:
The other issues are related a current macros.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I was just dealing with a problem trying to make a grid-based layout for editions/tw5.com, which includes the menubar plugin. The menubar is transcluded and has an extraneous But I added the 5-line change to wikiparser.js to my local copy of TW, and voila: the unwanted So this PR, if polished up to something that makes all the tests pass, would solve a real problem I'm having that I don't currently see any other way to solve. |
The tests show "hidden problems". The fixes are relatively straight forward. It needs to be fixed in a theme CSS. But that fix will make the whole thing not backwards compatible. So it will most likely cause problems with the vanilla theme. It may be possible to create a plugin, that overwrites the block-mode parser, but that's more or less the same as starting a "patch set" for TW. On the other hand, it would be a description, what needs to be changed, to fix the problems. So it's probably worth considering. I think it's also the only way to fix #6687 which bugs me for a long time already |
…nts: button, radio, checkbox, link -- In HTML they are inline, but for backwards compatibility they need to be covered in P tags :/
Important: Do NOT use the demo-wiki to publish anything -- It's for testing only!!!
File to play with: p-tags-parser-changed.zip
children[0]?.tag?.charAt(0)
... that's intentional