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

default reserved in IE8 (IE11) #275

Closed
jyio opened this issue Jul 3, 2016 · 2 comments
Closed

default reserved in IE8 (IE11) #275

jyio opened this issue Jul 3, 2016 · 2 comments
Assignees
Labels

Comments

@jyio
Copy link

jyio commented Jul 3, 2016

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;
@tivie tivie self-assigned this Jul 4, 2016
@tivie
Copy link
Member

tivie commented Jul 4, 2016

@jyio Thanks. I will have a look. Maybe change it to defaultValue. It's mostly used internally, so I doubt that change would affect anyone.

@tivie tivie added the bug label Jul 4, 2016
@tivie
Copy link
Member

tivie commented Jul 20, 2016

Should be fixed now

@tivie tivie closed this as completed in 984942e Jul 20, 2016
@showdownjs showdownjs deleted a comment from nkumargp Aug 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants