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

New Lines Not Recognized/Supported #81

Closed
joemccann opened this issue Oct 1, 2012 · 5 comments
Closed

New Lines Not Recognized/Supported #81

joemccann opened this issue Oct 1, 2012 · 5 comments

Comments

@joemccann
Copy link

If you copy paste the following in and run marked(theTextBelow):

Bacon ipsum dolor sit amet pastrami strip steak pancetta capicola pig t-bone corned beef filet mignon tenderloin ham hock hamburger bresaola swine tri-tip. Cow turducken jowl prosciutto. Venison meatloaf jowl salami frankfurter, tri-tip swine. 

Kielbasa spare ribs bacon jerky leberkas capicola filet mignon turkey pork shoulder rump short loin prosciutto. Tongue jerky jowl frankfurter shoulder leberkas salami pork belly flank pork kielbasa pork chop corned beef. Shankle short loin tail bacon ball tip t-bone frankfurter venison.

Frankfurter pork chop jerky capicola brisket, ribeye pork pastrami bacon. Meatloaf brisket venison chicken leberkas turducken shoulder jerky sirloin boudin. Turducken ribeye turkey pork boudin sausage. Cow frankfurter shankle shank boudin. 

It creates on huge paragraph as opposed to 3 separate paragraphs.

I'm trying to use Marked for dillinger.io, but this is a deal breaker. :/

@chjj
Copy link
Member

chjj commented Oct 1, 2012

$ marked
Bacon ipsum dolor sit amet pastrami strip steak pancetta capicola pig t-bone corned beef filet mignon tenderloin
 ham hock hamburger bresaola swine tri-tip. Cow turducken jowl prosciutto. Venison meatloaf jowl salami frankfur
ter, tri-tip swine. 

Kielbasa spare ribs bacon jerky leberkas capicola filet mignon turkey pork shoulder rump short loin prosciutto. 
Tongue jerky jowl frankfurter shoulder leberkas salami pork belly flank pork kielbasa pork chop corned beef. Sha
nkle short loin tail bacon ball tip t-bone frankfurter venison.

Frankfurter pork chop jerky capicola brisket, ribeye pork pastrami bacon. Meatloaf brisket venison chicken leber
kas turducken shoulder jerky sirloin boudin. Turducken ribeye turkey pork boudin sausage. Cow frankfurter shankl
e shank boudin. 
^D
<p>Bacon ipsum dolor sit amet pastrami strip steak pancetta capicola pig t-bone corned beef filet mignon tenderl
oin ham hock hamburger bresaola swine tri-tip. Cow turducken jowl prosciutto. Venison meatloaf jowl salami frank
furter, tri-tip swine. 

</p>
<p>Kielbasa spare ribs bacon jerky leberkas capicola filet mignon turkey pork shoulder rump short loin prosciutt
o. Tongue jerky jowl frankfurter shoulder leberkas salami pork belly flank pork kielbasa pork chop corned beef. 
Shankle short loin tail bacon ball tip t-bone frankfurter venison.

</p>
<p>Frankfurter pork chop jerky capicola brisket, ribeye pork pastrami bacon. Meatloaf brisket venison chicken le
berkas turducken shoulder jerky sirloin boudin. Turducken ribeye turkey pork boudin sausage. Cow frankfurter sha
nkle shank boudin. 
</p>

I don't see a problem. If a problem with something so essential existed, there would probably be multiple test failures. Marked is passing every test it should.

I'm guessing you're having the problem mentioned in #52, where sometimes contenteditable elements and other things will replace SP, LF, or CRLF with \u00a0 or something else weird like the unicode NL character. This is really the browsers fault, but I should probably land the fix for this because a lot of people seem unaware of this quirk.

@joemccann
Copy link
Author

Yeah would be great. Would love to move over to Marked for Dillinger.io

@paulmillr
Copy link

GFM bug:

A
B
C

on github gives:

A
B
C

when in marked it gives one line with three spaces

@yyfearth
Copy link

yyfearth commented Nov 3, 2012

but in GFM, it designed to be use new line directly instead of use spaces in one line, i think it is not a bug

http://github.github.com/github-flavored-markdown/:

Differences from traditional Markdown

Newlines

The biggest difference that GFM introduces is in the handling of linebreaks. With SM you can hard wrap paragraphs of text and they will be combined into a single paragraph. We find this to be the cause of a huge number of unintentional formatting errors. GFM treats newlines in paragraph-like content as real line breaks, which is probably what you intended.

so i think in marked, when i use gfm: true, it should be follow gfm style

@chjj
Copy link
Member

chjj commented Jan 3, 2013

This will either be solved with the fix referenced above, or from the addition of gfm line breaks.

@chjj chjj closed this as completed Jan 3, 2013
ghost pushed a commit to zergeborg/marked that referenced this issue May 13, 2016
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

4 participants