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

html with line breaks #4

Closed
jxson opened this issue Oct 3, 2011 · 3 comments
Closed

html with line breaks #4

jxson opened this issue Oct 3, 2011 · 3 comments

Comments

@jxson
Copy link

jxson commented Oct 3, 2011

I have run across a slight problem with marked when trying to render html with line breaks between the attributes:

<input type="text"
  name="email"
  value=""
  id="email-input"
  class="etc" />

I know this is not a normal use case but as far as I know it is valid html, I am willing to submit a patch if I can get some pointers on where/ how to modify this behavior.

@chjj
Copy link
Member

chjj commented Oct 3, 2011

It is easily fixable. It works that way because marked automatically encodes any angle brackets you have, but it needs to be able to distinguish them from brackets in html tags. An easy way to do it was to require that a tag be on a single line. I'm not sure of the behavior of the original markdown here.

I think I'll revise it a bit for some smarter behavior.

@chjj
Copy link
Member

chjj commented Oct 6, 2011

0d5e788

That should allow for multiline tags. It passes all tests, but I'm still going to wait a bit before pushing it to npm.

@chjj chjj closed this as completed Oct 6, 2011
@jxson
Copy link
Author

jxson commented Oct 7, 2011

Great! Thanks for jumping on it so quickly :)

clehner pushed a commit to clehner/marked that referenced this issue Mar 29, 2017
Disallow hashtags starting with a number
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

2 participants