Skip to content

Bold and italics within code blocks aren't recognized#57

Open
fmarier wants to merge 1 commit into
aaronsw:masterfrom
fmarier:bold_italics_in_code
Open

Bold and italics within code blocks aren't recognized#57
fmarier wants to merge 1 commit into
aaronsw:masterfrom
fmarier:bold_italics_in_code

Conversation

@fmarier

@fmarier fmarier commented Nov 5, 2012

Copy link
Copy Markdown
Contributor

Pass them through as raw HTML instead.

Pass them through as raw HTML instead.
@aaronsw

aaronsw commented Nov 5, 2012

Copy link
Copy Markdown
Owner

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

@fmarier

fmarier commented Nov 5, 2012

Copy link
Copy Markdown
Contributor Author

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.

@aaronsw

aaronsw commented Nov 5, 2012

Copy link
Copy Markdown
Owner

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?

@fmarier

fmarier commented Nov 5, 2012

Copy link
Copy Markdown
Contributor Author

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.

pombredanne pushed a commit to pombredanne/html2text that referenced this pull request Oct 10, 2015
Retain escaping of html except within code or pre tags.

Thanks Scott Blackburn @smblackburn
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

Successfully merging this pull request may close these issues.

2 participants