Ahoy. I encountered the following error on IE11 emulating IE8:
Expected identifier, string or number
... pointing to the options in src/options.js. Apparently, default is a reserved word. Has this occurred to anyone else? Anyhow, this works for me:
--- src/options.js
+++ src/options.js
@@ -7,72 +7,72 @@
var defaultOptions = {
omitExtraWLInCodeBlocks: {
- default: false,
+ 'default': false,
describe: 'Omit the default extra whiteline added to code blocks',
type: 'boolean'
},
noHeaderId: {
- default: false,
+ 'default': false,
describe: 'Turn on/off generated header id',
type: 'boolean'
},
prefixHeaderId: {
- default: false,
+ 'default': false,
describe: 'Specify a prefix to generated header ids',
type: 'string'
},
headerLevelStart: {
- default: false,
+ 'default': false,
describe: 'The header blocks level start',
type: 'integer'
},
parseImgDimensions: {
- default: false,
+ 'default': false,
describe: 'Turn on/off image dimension parsing',
type: 'boolean'
},
simplifiedAutoLink: {
- default: false,
+ 'default': false,
describe: 'Turn on/off GFM autolink style',
type: 'boolean'
},
literalMidWordUnderscores: {
- default: false,
+ 'default': false,
describe: 'Parse midword underscores as literal underscores',
type: 'boolean'
},
strikethrough: {
- default: false,
+ 'default': false,
describe: 'Turn on/off strikethrough support',
type: 'boolean'
},
tables: {
- default: false,
+ 'default': false,
describe: 'Turn on/off tables support',
type: 'boolean'
},
tablesHeaderId: {
- default: false,
+ 'default': false,
describe: 'Add an id to table headers',
type: 'boolean'
},
ghCodeBlocks: {
- default: true,
+ 'default': true,
describe: 'Turn on/off GFM fenced code blocks support',
type: 'boolean'
},
tasklists: {
- default: false,
+ 'default': false,
describe: 'Turn on/off GFM tasklist support',
type: 'boolean'
},
smoothLivePreview: {
- default: false,
+ 'default': false,
describe: 'Prevents weird effects in live previews due to incomplete input',
type: 'boolean'
},
smartIndentationFix: {
- default: false,
+ 'default': false,
description: 'Tries to smartly fix identation in es6 strings',
type: 'boolean'
}
@@ -83,7 +83,7 @@
var ret = {};
for (var opt in defaultOptions) {
if (defaultOptions.hasOwnProperty(opt)) {
- ret[opt] = defaultOptions[opt].default;
+ ret[opt] = defaultOptions[opt]['default'];
}
}
return ret;
Ahoy. I encountered the following error on IE11 emulating IE8:
... pointing to the options in
src/options.js. Apparently, default is a reserved word. Has this occurred to anyone else? Anyhow, this works for me: