Skip to content

Commit

Permalink
fix(code-block): fix language matching regex
Browse files Browse the repository at this point in the history
Fixed #90
  • Loading branch information
lyngai committed Mar 29, 2022
1 parent 2bf3fa8 commit 4fa3b43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/hooks/CodeBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export default class CodeBlock extends ParagraphBase {
* (\n*)捕获区块前的所有换行
* (?:[^\S\n]*)捕获```前置的空格字符
*/
begin: /(?:^|\n)(\n*(?:[^\S\n]*))```(.*?)\n/,
begin: /(?:^|\n)(\n*(?:[^\S\n]*))```([^`]*?)\n/,
content: /([\w\W]*?)/, // '([\\w\\W]*?)',
end: /[^\S\n]*```[ \t]*(?=$|\n+)/, // '\\s*```[ \\t]*(?=$|\\n+)',
};
Expand Down

0 comments on commit 4fa3b43

Please sign in to comment.