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 as links do not work #12

Closed
stephenharris opened this issue Mar 29, 2013 · 2 comments
Closed

Images as links do not work #12

stephenharris opened this issue Mar 29, 2013 · 2 comments
Labels

Comments

@stephenharris
Copy link
Owner

As posted here http://wordpress.org/support/topic/close-but-not-polished?replies=3#post-4032749

[![Adobe Bucks][2]][1]

[1]: http://google.com/
[2]: http://google.com/logo.png

Causes the MarkDown to be corrupted and the following error:

Notice: Undefined index: linkID in /var/www/git/WP-MarkDown/markdownify/markdownify.php on line 412

The post previews fine so the problem lies in the HTML -> MarkDown converter.

@stephenharris
Copy link
Owner Author

Turns out MarkDownify messes up the stack - it assumes the last thing (link) pushed to the stack is the url of the link when parsing. So if you add additional tags to the stack (in this instance an image), it thinks this what the link should point to.

The stack contains other details - attributes, reference ID (1 and 2 in the above) - and this mix up causes the above error.

@dwiel
Copy link

dwiel commented Mar 30, 2013

This fixed it for me. Thanks!

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

No branches or pull requests

2 participants