here’s another example:
<pre>args << "--with-z=/usr/local/Cellar/zlib/1.2.8"</pre>
just becomes:
args
here’s the MD output version (which I’ve already fixed):
http://iyware.com/osx-yosemite-mamp-homebrew-development-setup/
here’s the original WP version:
http://www.old.iyware.com/osx-yosemite-mamp-homebrew-development-setup/
I’m the maintainer of the HTML To Markdown PHP library that Ghost uses, so technically this glitch is my fault – sorry for the trouble!
I’ve filed an issue here: https://github.com/nickcernis/html-to-markdown/issues/21 I’m not yet sure if this is related to PHP’s DOMDocument library or to my own code, but I’ll see if I can find a workaround in a future version.
For now, if you could clarify whether or not you would expect <pre> tags to be preserved in the output that Ghost produces (rather than stripped), that would be handy to know.
Any other HTML to Markdown issues that come up relating to this plugin are welcome to be filed here: https://github.com/nickcernis/html-to-markdown/issues/
Hey @thedannywahl, thank you for the report, sorry I didn’t get around to it yet.
Hey @modernnerd! Thank you for fixing it. I’ll get around to update the plugin soon, and will pull in your updated version! 🙂 Thank you!
Gabor
No problem, @javorszky! Just to clarify that I haven’t fixed this issue just yet, but I’ll take a look when I can.
You’re welcome to file issues against the HTML to Markdown repo if any crop up. You’re also welcome to contribute patches if you discover issues yourself. (It looks like the code’s already changed to work around a conversion issue with multi-line code tags; if that was a bug, feel free to submit it as one.)
If you have a public repo for this plugin on GitHub, I’d also be happy to contribute conversion options so that your users can tune the Markdown output to their own needs (by stripping or retaining certain tags, for example, or retaining tags with style attributes etc.).
Awesome! I’ll see what I can do about the public repo, and I’ll get the changes I’ve done PR’d to yours. 🙂
The provided HTML is not valid – the < and > should be escaped as < and > respectively.
Oops, WordPress unencoded my HTML haha. Let’s try this again:
The provided HTML is not valid – the < and > should be escaped as < and > respectively.
Last try. If this doesn’t work, see here: http://stackoverflow.com/a/5068971/158766
The provided HTML is not valid – the < and > should be encoded as & plus lt; or gt; respectively.