Skip to content

Commit

Permalink
feat: disable pangu inline code by default
Browse files Browse the repository at this point in the history
  • Loading branch information
zjffun committed Oct 25, 2020
1 parent a68847b commit 7b42c69
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ remark().use(pangu, {
```js
{
text: true,
inlineCode: true,
inlineCode: false,
link: true,
image: true,
imageReference: true,
Expand Down
2 changes: 1 addition & 1 deletion defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module.exports = {
text: true,
inlineCode: true,
inlineCode: false,
link: true,
image: true,
imageReference: true,
Expand Down
34 changes: 33 additions & 1 deletion tests/inline-code/__snapshots__/run.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,52 @@ exports[`inline-code.md with options: {"inlineCode":false}: inline-code.md 1`] =
\`abc123\`
\`我a我1\`
\`new Date().getDate()\`
\`JSON.stringify({'test': '值test'})\`
\`./新建文件夹/node_modules/remark-pangu/index.js\`
\`printf("a = %d, b = %d\\n", a, b); // 打印 a 和 b\`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\`abc123\`
\`我a我1\`
\`new Date().getDate()\`
\`JSON.stringify({'test': '值test'})\`
\`./新建文件夹/node_modules/remark-pangu/index.js\`
\`printf("a = %d, b = %d\\n", a, b); // 打印 a 和 b\`
`;

exports[`inline-code.md with options: undefined: inline-code.md 1`] = `
\`abc123\`
\`我a我1\`
\`new Date().getDate()\`
\`JSON.stringify({'test': '值test'})\`
\`./新建文件夹/node_modules/remark-pangu/index.js\`
\`printf("a = %d, b = %d\\n", a, b); // 打印 a 和 b\`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\`abc123\`
\`我 a 我 1\`
\`我a我1\`
\`new Date().getDate()\`
\`JSON.stringify({'test': '值test'})\`
\`./新建文件夹/node_modules/remark-pangu/index.js\`
\`printf("a = %d, b = %d\\n", a, b); // 打印 a 和 b\`
`;
8 changes: 8 additions & 0 deletions tests/inline-code/inline-code.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
`abc123`

`我a我1`

`new Date().getDate()`

`JSON.stringify({'test': '值test'})`

`./新建文件夹/node_modules/remark-pangu/index.js`

`printf("a = %d, b = %d\n", a, b); // 打印 a 和 b`

0 comments on commit 7b42c69

Please sign in to comment.