Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

bug with function img_unautop #11

Closed
carlotrimarchi opened this issue Mar 11, 2014 · 1 comment
Closed

bug with function img_unautop #11

carlotrimarchi opened this issue Mar 11, 2014 · 1 comment

Comments

@carlotrimarchi
Copy link

I've discovered a strange behavior with the img_unautop function.

If in a post you insert a picture and then start the next text paragraph with a link, it happens that the whole thing (the image and the paragraph) gets wrapped in the <figure> tag, displaying the text with a different line height.

An example:

<a href="some_link"><img class="alignnone" alt="error" src="image.png" /></a>

<a href="http://example.com">Example</a> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.

I've found that a solution is to put an empty <span> tag before the link in the paragraph.

@olefredrik
Copy link
Owner

I could not reproduce this bug. Looks like it's working as you would expect. Or am I missing something?
unautop

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