mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 21:30:53 +08:00
server-ts: Port services/import/utils
This commit is contained in:
parent
fa0ed35752
commit
052a0a44f2
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Reference in a new issue