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

Support HTML start tags with new-lines in them. #493

Closed
wants to merge 1 commit into from

Conversation

tommie
Copy link

@tommie tommie commented Sep 25, 2014

HTML5 Start tags can contain "one or more space characters" (8.1.2.1 #3).

A "space character" is space, tab, LF, FF or CR (2.4.1).

This change makes marked support any Unicode white space in tags by restricting
the autolink to not contain any /\s/ character. It is slightly more permissive
than the HTML5 standard, but that is unlikely to be a problem in practice.

HTML5 Start tags can contain "one or more space characters" (8.1.2.1 markedjs#3).

A "space character" is space, tab, LF, FF or CR (2.4.1).

This change makes marked support any Unicode white space in tags by restricting
the autolink to not contain any /\s/ character. It is slightly more permissive
than the HTML5 standard, but that is unlikely to be a problem in practice.
@tommie tommie changed the title Support HTML start tags with new lines in them. Support HTML start tags with new-lines in them. Sep 25, 2014
@joshbruce
Copy link
Member

Closing as stale and merge conflicts.

@joshbruce joshbruce closed this Jan 21, 2018
@tommie
Copy link
Author

tommie commented Jan 21, 2018

As you wish. Though marked still doesn't support this, so wouldn't it be better if we got it merged?

(There was no point in me keeping the branch mergeable when I don't see a hint that it will be merged before the next conflict pops up. GitHub didn't send me a notification about your label changes in December.)

@joshbruce
Copy link
Member

joshbruce commented Jan 21, 2018

Hey @tommie. Yeah. Understand. See #956. I'm also not sure if it has been fixed since reviving the project...I seem to recall a fix for something like this by either @Feder1co5oave or @KostyaTretyak...what version are you using that still doesn't support this? just want to make sure.

@joshbruce joshbruce added this to the 0.4.0 - No known defects milestone Jan 21, 2018
@Feder1co5oave
Copy link
Contributor

Looks good to me... Autolinks should not contain whitespace: http://spec.commonmark.org/0.28/#absolute-uri

I'd like to see more test cases to show this though

@tommie
Copy link
Author

tommie commented Jan 22, 2018

#956 is great news!

what version are you using that still doesn't support this?

Three years later, I'm not really sure. I was using it through Polymer's , and that was probably before Polymer v1. Polymer v2 exists now. I just looked at the code, and it seemed the regexp still wasn't looking at all whitespace characters.

I'd like to see more test cases to show this though

@Feder1co5oave, I'm showing the new functionality works, and old tests show there is no change in existing behavior. What type of tests would you like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants