You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bitstein opened this issue
Jan 19, 2019
· 1 comment
Labels
extensionRelated to one or more of the included extensions.invalidInvalid report (user error, upstream issue, etc).wontfixThe issue will not be fixed for the stated reasons.
I am trying to create blockquotes that use Bootstrap 4 classes for proper rendering. However, the attr_list is giving an inner paragraph block element the attribute rather than the entire blockquote.
Input:
> Some things are in our control and others not.
>
> <footer class="blockquote-footer">Epictetus, <em>The Enchiridion</em></footer>
{: .blockquote}
Expected output:
<blockquote class="blockquote">
<p>Some things are in our control and others not.</p>
<footer class="blockquote-footer">Epictetus, <em>The Enchiridion</em></footer>
</blockquote>
Actual output:
<blockquote>
<p>Some things are in our control and others not.</p>
<p class="blockquote"></p><footer class="blockquote-footer">Epictetus, <em>The Enchiridion</em></footer><p></p>
</blockquote>
The text was updated successfully, but these errors were encountered:
...how would one differentiate between attributes defined on a row, or on a table. The syntax only defines the cells, the rows and table are inferred.
It is not possible to assign attributes to elements which don't actually exist in the document. Of course, that is not exactly true for blockquotes. The problem, however, is that lazy blockquotes are completely valid. Consider this first paragraph of and example in the Markdown rules:
> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
That is one paragraph which is wrapped in a blockquote. It does not matter that the second and third lines do not start with a angle bracket (>). Now let's add an attr_list to that:
> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
{: .blockquote}
Does that attr_list apply to the paragraph or the blockquote? It is not clear. One could argue for some variation which differentiated an attr_list applied to the blockquote and one applied to the paragraph, but the differences would be non-obvious. And that more-or-less leaves us where we are with lists and tables. And that consistency if fine by me.
From a technical standpoint, the way the extension works is that Markdown parses the document as normal, which results in the following HTML:
<blockquote><p>
This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
{: .blockquote}
</p></blockquote>
Then, the extension steps through the document and applies the attr_list to its parent element. Of course, in this case, that would be the paragraph, not the blockquote. In other words, the extension has no way of knowing if the line with the attr_list originally started with a > or not, so there is no way to change behavior based on that. Therefore, I'm inclined to not make such a change.
waylan
added
extension
Related to one or more of the included extensions.
wontfix
The issue will not be fixed for the stated reasons.
invalid
Invalid report (user error, upstream issue, etc).
labels
Jan 20, 2019
extensionRelated to one or more of the included extensions.invalidInvalid report (user error, upstream issue, etc).wontfixThe issue will not be fixed for the stated reasons.
I am trying to create blockquotes that use Bootstrap 4 classes for proper rendering. However, the attr_list is giving an inner paragraph block element the attribute rather than the entire blockquote.
Input:
Expected output:
Actual output:
The text was updated successfully, but these errors were encountered: