Skip to content
This repository has been archived by the owner on Jun 28, 2018. It is now read-only.

<p> nesting is inconsistent #20

Open
rreusser opened this issue May 20, 2017 · 3 comments
Open

<p> nesting is inconsistent #20

rreusser opened this issue May 20, 2017 · 3 comments

Comments

@rreusser
Copy link
Member

p tag nesting is a little inconsistent, which makes it challenging to manage formatting. For example,

[li]test[/li] --> <li>test</li>

whereas:

[li]**test**[/li] --> <li><p><strong>test</strong></p></li>

Perhaps it would be better if everything were nested in a p tag when not already. I suspect this is how markdown does it, though it would be worth checking.

@rreusser
Copy link
Member Author

rreusser commented May 25, 2017

Actually, checking over what github's markdown renderer does by inspecting this box, it seems the default is not to wrap in a p tag in most cases. A few sanity checks confirm that things basically make pretty good sense:

  • Test<p>Test</p>
  • <p>Test</p><p>Test</p>
  • **Test**<p><strong>Test</strong></p>
  • # **Test**<h1><strong>Test</strong></h1>
  • Adding a line break between any one of the items of a list triggers wrapping each <li>'s content in a p tag. Otherwise they're bare.

@mathisonian
Copy link
Member

Is this issue just for nesting <p>s inside of a list, or is it more general?

The updates I pushed to support nesting markdown syntax inside of the list syntax should help clean this up a little bit.

@rreusser
Copy link
Member Author

Found one more case that's a bit problematic:

[span][span]test[/span][/span] is rendered as <p><span><p><span>test</span></p></span></p> so that you can't currently nested components inline.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants