/** * Created by Tivie on 13-07-2015. */ function getDefaultOpts(simple) { 'use strict'; var defaultOptions = { omitExtraWLInCodeBlocks: { defaultValue: false, describe: 'Omit the default extra whiteline added to code blocks', type: 'boolean' }, noHeaderId: { defaultValue: false, describe: 'Turn on/off generated header id', type: 'boolean' }, prefixHeaderId: { defaultValue: false, describe: 'Specify a prefix to generated header ids', type: 'string' }, ghCompatibleHeaderId: { defaultValue: false, describe: 'Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)', type: 'boolean' }, headerLevelStart: { defaultValue: false, describe: 'The header blocks level start', type: 'integer' }, parseImgDimensions: { defaultValue: false, describe: 'Turn on/off image dimension parsing', type: 'boolean' }, simplifiedAutoLink: { defaultValue: false, describe: 'Turn on/off GFM autolink style', type: 'boolean' }, excludeTrailingPunctuationFromURLs: { defaultValue: false, describe: 'Excludes trailing punctuation from links generated with autoLinking', type: 'boolean' }, literalMidWordUnderscores: { defaultValue: false, describe: 'Parse midword underscores as literal underscores', type: 'boolean' }, strikethrough: { defaultValue: false, describe: 'Turn on/off strikethrough support', type: 'boolean' }, tables: { defaultValue: false, describe: 'Turn on/off tables support', type: 'boolean' }, tablesHeaderId: { defaultValue: false, describe: 'Add an id to table headers', type: 'boolean' }, ghCodeBlocks: { defaultValue: true, describe: 'Turn on/off GFM fenced code blocks support', type: 'boolean' }, tasklists: { defaultValue: false, describe: 'Turn on/off GFM tasklist support', type: 'boolean' }, smoothLivePreview: { defaultValue: false, describe: 'Prevents weird effects in live previews due to incomplete input', type: 'boolean' }, smartIndentationFix: { defaultValue: false, description: 'Tries to smartly fix indentation in es6 strings', type: 'boolean' }, disableForced4SpacesIndentedSublists: { defaultValue: false, description: 'Disables the requirement of indenting nested sublists by 4 spaces', type: 'boolean' }, simpleLineBreaks: { defaultValue: false, description: 'Parses simple line breaks as
(GFM Style)', type: 'boolean' }, requireSpaceBeforeHeadingText: { defaultValue: false, description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)', type: 'boolean' } }; if (simple === false) { return JSON.parse(JSON.stringify(defaultOptions)); } var ret = {}; for (var opt in defaultOptions) { if (defaultOptions.hasOwnProperty(opt)) { ret[opt] = defaultOptions[opt].defaultValue; } } return ret; } function allOptionsOn() { 'use strict'; var options = getDefaultOpts(true), ret = {}; for (var opt in options) { if (options.hasOwnProperty(opt)) { ret[opt] = true; } } return ret; }