Skip to content

Commit

Permalink
chore(deps): bump marked from 2.1.3 to 3.0.4 (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Sep 21, 2021
1 parent 4f21623 commit 8767792
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ marked:
- **smartypants** - Use "smart" typographic punctuation for things like quotes and dashes.
- **quotes** - Defines the double and single quotes used for substituting regular quotes if **smartypants** is enabled.
* Example: '«»“”'
* "double" will be turned into «single»
* "double" will be turned into «double»
* 'single' will be turned into “single”
* Both double and single quotes substitution must be specified, otherwise it will be silently ignored.
- **modifyAnchors** - Transform the anchorIds into lower case (`1`) or upper case (`2`).
Expand Down
4 changes: 2 additions & 2 deletions lib/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,15 @@ class Tokenizer extends MarkedTokenizer {
}

// Override smartypants
inlineText(src, inRawBlock) {
inlineText(src) {
const { options, rules } = this;
const { quotes, smartypants: isSmarty } = options;

// https://github.com/markedjs/marked/blob/b6773fca412c339e0cedd56b63f9fa1583cfd372/src/Tokenizer.js#L643-L658
const cap = rules.inline.text.exec(src);
if (cap) {
let text;
if (inRawBlock) {
if (this.lexer.state.inRawBlock) {
text = cap[0];
} else {
text = escape(isSmarty ? smartypants(cap[0], quotes) : cap[0]);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"license": "MIT",
"dependencies": {
"hexo-util": "^2.5.0",
"marked": "^2.1.3",
"marked": "^3.0.4",
"dompurify": "^2.3.0",
"jsdom": "^17.0.0"
},
Expand Down

0 comments on commit 8767792

Please sign in to comment.