Skip to content

Commit a8ba25e

Browse files
wj0990jaywcjlove
authored andcommitted
fix:Optimize editor to replace label case (#1)
1 parent a73ce90 commit a8ba25e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Markdown/allowNode.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default function allowNode(node: any, index: number, parent: NodeType) {
44
const nodeany: MarkdownAbstractSyntaxTree = node;
55
if (nodeany.type === 'html') {
66
// filter style
7-
node.value = node.value.replace(/<((style|script|link|input|form)|\/(style|script|link|input|form))(\s?[^\>]*\>)/g, (a: string) => {
7+
node.value = node.value.replace(/<((style|script|link|input|form)|\/(style|script|link|input|form))(\s?[^\>]*\>)/gi, (a: string) => {
88
return a.replace(/[<>]/g, (e: string) => (({ '<': '&lt;', '>': '&gt;' } as { [key: string]: string })[e]))
99
});
1010
}

0 commit comments

Comments
 (0)