mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 02:06:29 -05:00
Remove deprecated code in basic markdown-it configurator
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
ec921f775c
commit
262208657c
2 changed files with 1 additions and 4 deletions
|
@ -17,7 +17,7 @@ import { useCalculateLineMarkerPosition } from './utils/calculate-line-marker-po
|
|||
import { useExtractFirstHeadline } from './hooks/use-extract-first-headline'
|
||||
import { TocAst } from 'markdown-it-toc-done-right'
|
||||
import { useOnRefChange } from './hooks/use-on-ref-change'
|
||||
import { BasicMarkdownItConfigurator } from './markdown-it-configurator/BasicMarkdownItConfigurator'
|
||||
import { BasicMarkdownItConfigurator } from './markdown-it-configurator/basic-markdown-it-configurator'
|
||||
import { ImageClickHandler } from './replace-components/image/image-replacer'
|
||||
import { useTrimmedContent } from './hooks/use-trimmed-content'
|
||||
|
||||
|
@ -52,14 +52,12 @@ export const BasicMarkdownRenderer: React.FC<BasicMarkdownRendererProps & Additi
|
|||
}) => {
|
||||
const markdownBodyRef = useRef<HTMLDivElement>(null)
|
||||
const currentLineMarkers = useRef<LineMarkers[]>()
|
||||
const hasNewYamlError = useRef(false)
|
||||
const tocAst = useRef<TocAst>()
|
||||
const [trimmedContent, contentExceedsLimit] = useTrimmedContent(content)
|
||||
|
||||
const markdownIt = useMemo(
|
||||
() =>
|
||||
new BasicMarkdownItConfigurator({
|
||||
onParseError: (errorState) => (hasNewYamlError.current = errorState),
|
||||
onToc: (toc) => (tocAst.current = toc),
|
||||
onLineMarkers:
|
||||
onLineMarkerPositionChanged === undefined
|
||||
|
|
|
@ -37,7 +37,6 @@ import { quoteExtra } from '../markdown-it-plugins/quote-extra'
|
|||
import { documentTableOfContents } from '../markdown-it-plugins/document-table-of-contents'
|
||||
|
||||
export interface ConfiguratorDetails {
|
||||
onParseError: (error: boolean) => void
|
||||
onToc: (toc: TocAst) => void
|
||||
onLineMarkers?: (lineMarkers: LineMarkers[]) => void
|
||||
useAlternativeBreaks?: boolean
|
Loading…
Reference in a new issue