Emphasized line in a list is not highlighted correctly
Closed this issue · 1 comments
cernoch commented
As I understand Mardown, the following code
- Hello
*World*
Should create a list with 1 item and 2 paragraphs, where the second one is emphasized.
But the following test does not work:
import java.io.StringReader;
import java.io.StringWriter;
import static org.junit.Assert.*;
import org.junit.Test;
import org.tautua.markdownpapers.Markdown;
import org.tautua.markdownpapers.parser.ParseException;
public class MarkdownTest {
@Test
public void emphasisAroundElementInAList() {
String strong = transform("- Hello\n\n **World**");
String em = transform("- Hello\n\n *World*");
assertEquals(strong.replace("strong>", "em>"), em);
}
private String transform(String in) {
StringWriter out = new StringWriter();
Markdown md = new Markdown();
try {
md.transform(new StringReader(in), out);
} catch (ParseException e) {
throw new RuntimeException("Error parsing Markdown", e);
}
return out.toString();
}
}
lruiz commented
v1.3.1 released