mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 02:52:27 +08:00
Potential fix for code scanning alert no. 55: Useless regular-expression character escape
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
8b2176344a
commit
6cc4b7e226
@ -249,7 +249,7 @@ export class ContentExtractionTool implements ToolHandler {
|
|||||||
const headings = [];
|
const headings = [];
|
||||||
|
|
||||||
for (let i = 1; i <= 6; i++) {
|
for (let i = 1; i <= 6; i++) {
|
||||||
const headingRegex = new RegExp(`<h${i}[^>]*>([\s\S]*?)<\/h${i}>`, 'gi');
|
const headingRegex = new RegExp(`<h${i}[^>]*>([\\s\\S]*?)<\/h${i}>`, 'gi');
|
||||||
let headingMatch;
|
let headingMatch;
|
||||||
|
|
||||||
while ((headingMatch = headingRegex.exec(content)) !== null) {
|
while ((headingMatch = headingRegex.exec(content)) !== null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user