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

Images not rendered as figures in lists (when not at the end) #5368

Closed
gwern opened this issue Mar 15, 2019 · 1 comment
Closed

Images not rendered as figures in lists (when not at the end) #5368

gwern opened this issue Mar 15, 2019 · 1 comment

Comments

@gwern
Copy link
Contributor

gwern commented Mar 15, 2019

This appears to be a possible variant of #5285 : images which are block elements in lists are not treated as <figure> elements (breaking styling) unless they are the final block element in the list, in which case they work correctly.

I noticed this while working on https://www.gwern.net/Ads#replication , reviewing each of the studies with a screenshot of their relevant graph. They should all be getting captions & borders as their syntax is identical, but only the final one does, and the previous ones turn out to be merely naked <img> tags.

Here is a simple test-case along the lines of #5285:

1. foo

    ![bar](bar.png)
2. foo2

    ![bar2](bar2.png)
3. foo3

    ![foo3](foo3.png)

Quux.

yields

<ol type="1">
<li><p>foo</p>
<p><img src="bar.png" alt="bar" /></p></li>
<li><p>foo2</p>
<p><img src="bar2.png" alt="bar2" /></p></li>
<li><p>foo3</p>
<figure>
<img src="foo3.png" alt="foo3" /><figcaption>foo3</figcaption>
</figure></li>
</ol>
<p>Quux.</p>
$ pandoc --version
pandoc 2.6.1
Compiled with pandoc-types 1.17.5.4, texmath 0.11.2, skylighting 0.7.6
@jgm jgm closed this as completed in 8632526 Mar 15, 2019
@gwern
Copy link
Contributor Author

gwern commented Mar 15, 2019

Confirmed fixed in https://www.gwern.net/Ads#replication now, thanks.

jgm added a commit that referenced this issue Mar 18, 2019
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

1 participant