mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
server-ts: Port services/import/utils
This commit is contained in:
parent
fa0ed35752
commit
052a0a44f2
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
function handleH1(content, title) {
|
||||
function handleH1(content: string, title: string) {
|
||||
content = content.replace(/<h1>([^<]*)<\/h1>/gi, (match, text) => {
|
||||
if (title.trim() === text.trim()) {
|
||||
return ""; // remove whole H1 tag
|
||||
@ -11,6 +11,6 @@ function handleH1(content, title) {
|
||||
return content;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
export = {
|
||||
handleH1
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user