This repository has been archived on 2020-11-02. You can view files and clone it, but cannot push or open issues or pull requests.
TripSit_Suite/node_modules/markdown-escapes/index.js

58 lines
610 B
JavaScript
Raw Normal View History

'use strict'
module.exports = escapes
var defaults = [
'\\',
'`',
'*',
'{',
'}',
'[',
']',
'(',
')',
'#',
'+',
'-',
'.',
'!',
'_',
'>'
]
var gfm = defaults.concat(['~', '|'])
var commonmark = gfm.concat([
'\n',
'"',
'$',
'%',
'&',
"'",
',',
'/',
':',
';',
'<',
'=',
'?',
'@',
'^'
])
escapes.default = defaults
escapes.gfm = gfm
escapes.commonmark = commonmark
// Get markdown escapes.
function escapes(options) {
var settings = options || {}
if (settings.commonmark) {
return commonmark
}
return settings.gfm ? gfm : defaults
}