-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
two lines breaks after headlines #12
Comments
@DavidWiesner This is because during header parsing, the following is used:
Later down in the code, newlines are converted to
Since that newline is appended after the header, I'm assuming that its getting picked up in the |
@DavidWiesner I have a PR out that should resolve this. It's branch "test_fix". If you could pull down and test it I'd appreciate the help. I ran your example and it worked okay (FYI). |
@mikegioia ko i will check that. thx for your PR |
@mikegioia I still got the wrong result. The test written in the Issue description still failed. In general converting two newlines to lines breaks, is not the problem in general. Just newlines after or before a HTML-blockelement (like h1-h6) should't be add new it("headline with newlines", function (done) {
var text='hello\n###new\nworld';
var expected='hello<h3>new</h3>world';
var result=micromarkdown.parse(text);
// remove newlines in result (don't get rendered)
result=result.replace(/\n/g, '');
expect(result).to.equal(expected);
}); regards, |
Hi,
thanks for your project!
I found a bug when using micromarkdown.
When I use # to mark a headline the parser add to line breaks behind the headline.
Expected behaviour
Text
Hello # new world
rendered
Actual behaviour
rendered
Test
Maybe this bug also affect other block elements too.
The text was updated successfully, but these errors were encountered: