mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01: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:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user