Make markdown.js work with IE8 #68

Merged
merged 1 commit into from Apr 21, 2013

Conversation

Projects
None yet
2 participants
@tatsuhiro-t
Contributor

tatsuhiro-t commented Dec 11, 2012

IE8's Array.prototype.splice requires 2nd argument to specify the
number of elements to be removed. Without that, nothing is removed.

If JS compressor (e.g., yui) compresses markdown.js,

... function Markdown(dialect) {

will become something like:

... function g(d) { ...

Then, Markdown.dialects.Gruber becomes g.dialects.Gruber.
But IE8 does not understand this. The fix is just remove
"Markdown" from after "function".

Make markdown.js work with IE8
IE8's Array.prototype.splice requires 2nd argument to specify the
number of elements to be removed. Without that, nothing is removed.

If JS compressor (e.g., yui) compresses markdown.js,

  ... function Markdown(dialect) {

will become something like:

  ... function g(d) { ...

Then, Markdown.dialects.Gruber becomes g.dialects.Gruber.
But IE8 does not understand this. The fix is just remove
"Markdown" from after "function".

evilstreak added a commit that referenced this pull request Apr 21, 2013

Merge pull request #68 from tatsuhiro-t/master
Make markdown.js work with IE8

@evilstreak evilstreak merged commit 98d99c8 into evilstreak:master Apr 21, 2013

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