Skip to content

Commit d51d7d6

Browse files
committed
fix pre formatting
1 parent 9d69d01 commit d51d7d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TextFormatting.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function textFormatting(str) {
55
if (str === undefined) return "";
66
if (typeof str != 'string') return "";
77

8-
const regTop = /(\*\*?|__?|~~|[<>\r\n])|\[([^[]*)\]\(([^(]*)\)|!\[([^[]*)\]\(([^(]*)\)|`([^`]+)`|```([^`]+)```|(#{1,6})\ (.*)/g;
8+
const regTop = /(\*\*?|__?|~~|[<>\r\n])|\[([^[]*)\]\(([^(]*)\)|!\[([^[]*)\]\(([^(]*)\)|`([^`]+)`|```((?:.|\n)*)```|(#{1,6})\ (.*)/g;
99

1010
const closeTag = {};
1111
const renderTag = tag => {

0 commit comments

Comments
 (0)