Markdown

remove <p>content</p> wrapping - Markdown

remove <p>content</p> wrapping

by johnd0e » Fri Oct 04, 2019 3:18 pm

Currently all content (generated with this extension enabled) is wrapped into additional <p>aragraph.
Is this really necessary?

In fact, it conflicts with [spoiler] bbcode, and I suspect that it can be caused by that excessive <p> wrapping.
johnd0e
Registered User
Posts: 4
Joined: Fri Oct 04, 2019 3:07 pm
Contact:

Re: remove <p>content</p> wrapping

by AbaddonOrmuz » Sun Oct 06, 2019 2:52 am

johnd0e wrote: Currently all content (generated with this extension enabled) is wrapped into additional <p>aragraph.
Is this really necessary?
Well, that's the most adopted implementation for Markdown. Removing them is not an option since Litedown, the plugin used for that, works that way.

The problem is not that it adds extra <p> tags, the problem is that, phpBB changes the styling for some tags like the one for paragraph.

I would guess it's because it wasn't expected that someone would add those tags in the content (post, messages, etc).

I'm treating those kind of issues as CSS bugs, so if you have issues you could report them here.
johnd0e wrote: In fact, it conflicts with [spoiler] bbcode, and I suspect that it can be caused by that excessive <p> wrapping.
Well, I don't think it adds excessive paragraph wrapping, that's how (in my opinion) should behave.

In the particular case for the spoiler, you could easily fix it with CSS. For example (untested):

Code: Select all

.spoiler p:last-child {
	margin-bottom: 0;
}
Some of my phpBB extensions: [ Imgur | SEO Metadata | Markdown ]
Check out all my extensions
Arch Linux user
User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 724
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact:

Re: remove <p>content</p> wrapping

by johnd0e » Wed Oct 09, 2019 3:02 pm

Removing them is not an option since Litedown, the plugin used for that, works that way.
In fact it's possible https://github.com/s9e/TextFormatter/is ... -539991514
In the particular case for the spoiler, you could easily fix it with CSS.
Perhaps you mean https://github.com/AlfredoRamos/phpbb-e ... le-spoiler

Unfortunately our board implements spoiler functionality via such bbcode: https://pastebin.com/aizmGTJP
johnd0e
Registered User
Posts: 4
Joined: Fri Oct 04, 2019 3:07 pm
Contact:

Re: remove <p>content</p> wrapping

by AbaddonOrmuz » Wed Oct 09, 2019 7:23 pm

johnd0e wrote:In fact it's possible https://github.com/s9e/TextFormatter/is ... -539991514
Thanks but I'm already aware of that.

I didn't say it was not possible, I said that it's not an option to remove that feature from this extension.
johnd0e wrote: Unfortunately our board implements spoiler functionality via such bbcode: https://pastebin.com/aizmGTJP
Then please, for future references, provide as much information as you can when reporting an issue.

You can try the following:

Code: Select all

.spoilercontent  p:last-child {
	margin-bottom: 0;
}
Some of my phpBB extensions: [ Imgur | SEO Metadata | Markdown ]
Check out all my extensions
Arch Linux user
User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 724
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo Ramos
Contact: