-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
fix issues link references and prototypes #1299
Conversation
@joshbruce @styfle |
test/specs/marked/marked.json
Outdated
"markdown": "Link: [constructor][].\n\n[constructor]: https://example.org/", | ||
"html": "<p>Link: <a href=\"https://example.org/\">constructor</a>.</p>", | ||
"example": 10 | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you keep the example numbers in order?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, done. (I thought they were alphabetically ordered by section.)
Link with names that clashed with properties inherited from the Object prototype (such as "constructor") were not expanding. This fixes this issue. Before this change, markdown of this form...: Link: [constructor][]. [constructor]: https://example.org/ ...resulted in HTML output of this form: <p>Link: [constructor][].</p> With this change, it now renders as expected: <p>Link: <a href="https://example.org/">constructor</a>.</p>
The polyfill at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create does not support Would this be tolerable?
The tiny edge-case bug this fixes will still exist in IE8, but it also means not having to ship a polyfill. An issue can be opened for adding the polyfill and it can happen later (or the issue can be closed whenever IE8 support is dropped). EDIT: Also not sure if the tests are run in browsers. If so, we'll need a mechanism to skip the new test in IE8. Not familiar enough with the project to know offhand if one already exists... |
I'm ok with the check for |
I'll assume "not support IE8" is the most likely path until someone else weighs in to the contrary. :-D |
@styfle, @UziTech, et al: Given the data we have from #1215 and the fact that IE11 isn't supported by Microsoft anymore I'm pretty okay with not supporting IE8 as well. Having said that, I do wonder what criteria we should set for supporting IE in general (more specifically JS engines)...feel like we almost had this conversation not too long ago. |
@joshbruce There is some discussion of when to begin using newer JS features (namely ES6) in the following tickets:
I am fine with dropping support for IE 8 but we have to be careful about IE 11 because that still has sizable market share in enterprise environments (unfortunately). |
Float a patch on marked-0.4.0 that fixes a bug that breaks links that are named the same as properties on the Object prototype. Refs: markedjs/marked#1299
fix issues link references and prototypes
Marked version: 0.4.0
Markdown flavor: Markdown.pl
Description
Link with names that clashed with properties inherited from the
Object prototype (such as "constructor") were not expanding. This fixes
this issue.
Before this change, markdown of this form...:
...resulted in HTML output of this form:
With this change, it now renders as expected:
Contributor
Committer
In most cases, this should be a different person than the contributor.