diff options
Diffstat (limited to 'assets/node_modules/remark-parse/lib/locate/strong.js')
-rw-r--r-- | assets/node_modules/remark-parse/lib/locate/strong.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/assets/node_modules/remark-parse/lib/locate/strong.js b/assets/node_modules/remark-parse/lib/locate/strong.js new file mode 100644 index 0000000..44b95cd --- /dev/null +++ b/assets/node_modules/remark-parse/lib/locate/strong.js @@ -0,0 +1,18 @@ +'use strict' + +module.exports = locate + +function locate(value, fromIndex) { + var asterisk = value.indexOf('**', fromIndex) + var underscore = value.indexOf('__', fromIndex) + + if (underscore === -1) { + return asterisk + } + + if (asterisk === -1) { + return underscore + } + + return underscore < asterisk ? underscore : asterisk +} |