mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-20 14:56:17 -04:00
fix: sonar
This commit is contained in:
parent
3f7745de2c
commit
8371d208b1
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ function stripHtmlTags(text: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function stripMarkdownLinks(text: string, replacement: string = '$1') {
|
function stripMarkdownLinks(text: string, replacement: string = '$1') {
|
||||||
return text.replace(/\[([^\]]*)\]\([^\)]*\)/g, replacement);
|
return text.replace(/\[([^\]]*)\]\([^\)]*\)/g, replacement); // NOSONAR
|
||||||
};
|
};
|
||||||
|
|
||||||
function concatDashes(text: string) {
|
function concatDashes(text: string) {
|
||||||
|
@ -81,7 +81,7 @@ function getTitles(markdown: string, idGenerator: (titleMarkdownContent: string)
|
||||||
return '';
|
return '';
|
||||||
});
|
});
|
||||||
|
|
||||||
[...markdown.matchAll(/^(#+)(.*$)/mg)].forEach(
|
[...markdown.matchAll(/^(#+)(.*$)/mg)].forEach( // NOSONAR
|
||||||
([match, levelString, titleContent]) => {
|
([match, levelString, titleContent]) => {
|
||||||
const level = levelString.length;
|
const level = levelString.length;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue