mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-03 08:28:54 -04:00
fix(frontend): first heading will be cleared
If all headings are deleted the note title will be deleted and not be kept to the last value. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
02a5f62d27
commit
1609f3e01f
2 changed files with 2 additions and 13 deletions
|
@ -19,13 +19,10 @@ import type { CommonMarkdownRendererProps, HeightChangeRendererProps } from '../
|
|||
import { DocumentTocSidebar } from './document-toc-sidebar'
|
||||
import styles from './markdown-document.module.scss'
|
||||
import useResizeObserver from '@react-hook/resize-observer'
|
||||
import React, { useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { Logger } from '../../../../utils/logger'
|
||||
import React, { useMemo, useRef, useState } from 'react'
|
||||
|
||||
export type DocumentMarkdownRendererProps = CommonMarkdownRendererProps & ScrollProps & HeightChangeRendererProps
|
||||
|
||||
const logger = new Logger('DocumentMarkdownRenderer')
|
||||
|
||||
/**
|
||||
* Renders a Markdown document and handles scrolling, yaml metadata and a floating table of contents.
|
||||
*
|
||||
|
@ -67,11 +64,6 @@ export const DocumentMarkdownRenderer: React.FC<DocumentMarkdownRendererProps> =
|
|||
const markdownBodyRef = useRef<HTMLDivElement>(null)
|
||||
const currentLineMarkers = useRef<LineMarkers[]>()
|
||||
|
||||
// ToDo: Remove this
|
||||
useEffect(() => {
|
||||
logger.debug(markdownContentLines)
|
||||
}, [markdownContentLines])
|
||||
|
||||
const extensions = useMarkdownExtensions(
|
||||
baseUrl,
|
||||
RendererType.DOCUMENT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue