html2text icon indicating copy to clipboard operation
html2text copied to clipboard

Bold and italics within code blocks aren't recognized

Open fmarier opened this issue 13 years ago • 4 comments

Pass them through as raw HTML instead.

fmarier avatar Nov 05 '12 09:11 fmarier

What's the use case for this? I'm having trouble understanding why you'd want this result.

aaronsw avatar Nov 05 '12 15:11 aaronsw

That patch (and the other ones) comes from my Blogger-to-Ikiwiki conversion script.

On my blog, I've got code samples where I highlight particular pieces by making them bold or italics.

fmarier avatar Nov 05 '12 19:11 fmarier

Yeah, but in standard Markdown indented HTML tags get escaped. So this doesn't seem like it would help. Is this not true with ikiwiki?

aaronsw avatar Nov 05 '12 19:11 aaronsw

Hm, you're right. I just tried it with the normal markdown cli tool and the above test case produces this mess:

<p>This is a <b>bold</b> statement.</p>

<pre><code>This is a &lt;i&gt;foreign&lt;/i&gt; word.
</code></pre>

which isn't even consistent.

In the ikiwiki parser, it lets these tags through. In fact I have more hacks that take advantage of that.

fmarier avatar Nov 05 '12 19:11 fmarier