sirthias/pegdown — Issue #40: Strong inside emphasis renders incorrectly
Author: OverZealous
Created: 2011-11-28 21:09:47+00:00
State: open

It appears that putting a strong (bold) inside an emphasis (italic) using the same character renders incorrectly.

Example:

*This is a **test***

Expected Output:

This is a test

> *This is a **test***

Actual Output:

This is a test**

> *This is a test*\*\*

The bold tag doesn't need to be at the end: `*This **is a ** test*` is also rendered incorrectly.

The inverse isn't a problem (ie: `**This is a *test***` renders fine).

It looks like a single asterisk is getting priority over a double asterisk. I haven't had time to dig into the source to see what's going on yet.