diff --git a/README.md b/README.md index 84a2536..9a06819 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ https://github.com/jxson/front-matter [npm-image]: https://img.shields.io/npm/v/mmp-build?style=flat-square [lic-image]: https://img.shields.io/npm/l/mmp-build?style=flat-square -[size-image]: https://img.shields.io/github/languages/code-size/next-theme/mmp-build?style=flat-square +[size-image]: https://img.shields.io/github/languages/code-size/stevenjoezhang/mmp-build?style=flat-square [dm-image]: https://img.shields.io/npm/dm/mmp-build?style=flat-square [dt-image]: https://img.shields.io/npm/dt/mmp-build?style=flat-square diff --git a/lib/generator/marked.js b/lib/generator/marked.js index e38c029..23b1b4f 100644 --- a/lib/generator/marked.js +++ b/lib/generator/marked.js @@ -3,7 +3,7 @@ const marked = require("marked"); class Lexer extends marked.Lexer { constructor() { super(...arguments); - this.tokenizer.rules.inline.em = /^\*((?:\*\*|[^*])+?)\*(?!\*)/; + this.tokenizer.rules.inline.em.start = /^(?:(\*(?=[punctuation]))|\*)(?![*\s])/; } static lex(src, options) { diff --git a/package.json b/package.json index b62de86..6b45e58 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,6 @@ "hexo-front-matter": "^2.0.0", "hexo-pangu": "^0.2.0", "highlight.js": "^10.0.0", - "marked": "^1.0.0" + "marked": "1.1.1" } }