Skip to content
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

<p> </p> doesn't seem to be supported #6

Open
mofosyne opened this issue Jul 22, 2014 · 4 comments
Open

<p> </p> doesn't seem to be supported #6

mofosyne opened this issue Jul 22, 2014 · 4 comments

Comments

@mofosyne
Copy link

According to http://daringfireball.net/projects/markdown/syntax#p

multiple spaces means a new paragraph.

This doesn't seem to happen here. Was it forgotten or is there a specific reason to not include it? (like size)

@drakmail
Copy link

👍

@mofosyne
Copy link
Author

Yea he really needs a documentation. After digging though regexes, his method of dealing with newlines between paragraph is show below. Probably because paragraph detection depends on 'context' awareness in parsers, and that can get expensive in terms of implementation for such a small parser like this.

INSERTING <br/><br/> IN MICRO-MARKDOWN:

  • "spacebar"x(2 or more) and then a newline(enter).
  • Do this multiple times for more 'newlines'== <br/><br/>

e.g.

paragraph

paragraph

@scandox
Copy link

scandox commented Dec 15, 2016

I noticed, however, that the behaviour of his demo seems correct: http://simonwaldherr.github.io/micromarkdown.js/

Even though when I embed it myself the behaviour isn't correct. I checked the outputs of his demo and my code and his output identifies and adds the two <br/> tags without my adding any spaces at the end of the last line. As long as I make two returns it is fine.

However within my own code this doesn't work. I notice he calls mmd.htmlEncode on his after the parsing. Again when I try this, it doesn't produce the desired effect.

I'm thinking perhaps it has something to do with the textarea element and the format of the string is passed in.

@scandox
Copy link

scandox commented Dec 15, 2016

Well the answer in my case was that this commit: e2ea700

Doesn't seem to have found its way into the NPM package.

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

No branches or pull requests

3 participants