Closed takkuumi closed 9 years ago
Current parser needs a blank line before the code fence as you have in input 2 or the para block is not closed as you have for input 1.
It is a bug.
Need to change parser Rule to insert a test for fenced code (regression tests pass):
public Rule NormalEndline() {
return Sequence(
Sp(), Newline(),
TestNot(
FirstOf(
BlankLine(),
'>',
AtxStart(),
Sequence(ZeroOrMore(NotNewline(), ANY), Newline(),
FirstOf(NOrMore('=', 3), NOrMore('-', 3)), Newline()),
// test for fenced code
FencedCodeBlock()
)
),
ext(HARDWRAPS) ? toRule(push(new SimpleNode(Type.Linebreak))) : toRule(push(new TextNode(" ")))
);
}
When i use pegdown to parse markdown with Code Block,i have found it print two diffrenent result.
1. Input:
Output:
2. Input:
Output:
If no world before
```c
,it output:I just want the Code Block result like
@sirthias How to do it?
This is my config:
EmojiParser
is my own plugin.thanks!