diff --git a/web/ui/src/idai_field/manual/MarkdownViewer.css b/web/ui/src/idai_field/manual/MarkdownViewer.css index f270f19eba..5aa7616ee9 100644 --- a/web/ui/src/idai_field/manual/MarkdownViewer.css +++ b/web/ui/src/idai_field/manual/MarkdownViewer.css @@ -11,7 +11,6 @@ #markdown-viewer h1::before { counter-increment: h1Counter; - content: counter(h1Counter) '. '; } @@ -22,7 +21,6 @@ #markdown-viewer h2::before { counter-increment: h2Counter; - content: counter(h1Counter) '.' counter(h2Counter) ' '; } #markdown-viewer h3 { @@ -32,7 +30,6 @@ #markdown-viewer h3::before { counter-increment: h3Counter; - content: counter(h1Counter) '.' counter(h2Counter) '.' counter(h3Counter) ' '; } #markdown-viewer h4 { @@ -42,7 +39,6 @@ #markdown-viewer h4::before { counter-increment: h4Counter; - content: counter(h1Counter) '.' counter(h2Counter) '.' counter(h3Counter) '.' counter(h4Counter) ' '; } #markdown-viewer h5 { @@ -51,7 +47,6 @@ #markdown-viewer h5::before { counter-increment: h5Counter; - content: counter(h1Counter) '.' counter(h2Counter) '.' counter(h3Counter) '.' counter(h4Counter) '.' counter(h5Counter) ' '; } #markdown-viewer h1, @@ -62,7 +57,7 @@ margin-top: 25px; } -#markdown-viewer h1:first-child { +#markdown-viewer h2:first-child { margin-top: 0; } diff --git a/web/ui/src/idai_field/manual/loadManual.ts b/web/ui/src/idai_field/manual/loadManual.ts index aeb99b1fe0..9fdaaaacc7 100644 --- a/web/ui/src/idai_field/manual/loadManual.ts +++ b/web/ui/src/idai_field/manual/loadManual.ts @@ -36,13 +36,13 @@ const loadMarkdown = (url: string): Promise => { const setHeadingIds = (markdown: string): string => { return markdown.replace( - /(^|\n)# .*\n/g, + /(^|\n)## .*\n/g, (text: string) => { const heading: string = text - .replace('# ', '') + .replace('## ', '') .replace(/\n/g, ''); const id: string = heading.replace(' ', '-').toLowerCase(); - return `

${heading}

\n`; + return `

${heading}

\n`; } ); }; @@ -50,10 +50,10 @@ const setHeadingIds = (markdown: string): string => { const getChapters = (markdown: string): Chapter[] => { - const matches = markdown.match(/

.*<\/h1>/g); + const matches = markdown.match(/

.*<\/h2>/g); return matches.map(match => { - const result = /

(.*)<\/h1>/g.exec(match); + const result = /

(.*)<\/h2>/g.exec(match); return { id: result[1], label: result[2]