Merge pull request #2 from rfc1437/alert-autofix-4

Potential fix for code scanning alert no. 4: Incomplete string escaping or encoding
This commit is contained in:
Georg Bauer
2026-02-16 18:06:49 +01:00
committed by GitHub
3 changed files with 83 additions and 22 deletions

View File

@@ -79,7 +79,7 @@ vi.mock('@milkdown/kit/utils', () => ({
$remark: () => ({}),
$prose: () => ({}),
replaceAll: (content: string) => () => {
const normalized = content.replace('\n', '\n\n');
const normalized = content.replace(/\n/g, '\n\n');
markdownUpdatedHandler?.({}, normalized, '');
},
callCommand: () => () => {},