-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PrefixHeaderId does not accept forward slashes #409
Comments
According to the HTML spec:
|
Is showdown still living in HTML4, then? That link is HTML4. Here's the direct quote from W3 HTML5 specification:
and
|
Showdown supports both HTML4 and HTML5 spec (with some restrictions). |
I don't know how we could make showdown compliant with HTML4 and HTML5, honestly |
This option removes only spaces, ' and " from generated Header IDs, replacing them with dashes. This might generate malformed IDs. Closes #409
…g the prefix Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix). Has no effect if prefixHeaderId is set to false. Closes #409
@baileyherbert You now have 2 options to fix this:
Keep in mind that both options might result in malformed IDs. For instance, when you use |
Yup, working perfect now. Thanks! |
An
id
attribute value may, according to HTML5 and in browser practice, contain any characters except space characters.In showdown, passing a forward slash in as an ID prefix, like this:
Yields a very unexpected result. Instead of generated IDs looking like
id="/layout/simplified-header-text"
it looks instead likeid="layoutsimplified-header-text"
.Is there an easy workaround to this?
The text was updated successfully, but these errors were encountered: