mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 10:16:32 -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 { useExtractFirstHeadline } from './hooks/use-extract-first-headline'
|
||||||
import { TocAst } from 'markdown-it-toc-done-right'
|
import { TocAst } from 'markdown-it-toc-done-right'
|
||||||
import { useOnRefChange } from './hooks/use-on-ref-change'
|
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 { ImageClickHandler } from './replace-components/image/image-replacer'
|
||||||
import { useTrimmedContent } from './hooks/use-trimmed-content'
|
import { useTrimmedContent } from './hooks/use-trimmed-content'
|
||||||
|
|
||||||
|
@ -52,14 +52,12 @@ export const BasicMarkdownRenderer: React.FC<BasicMarkdownRendererProps & Additi
|
||||||
}) => {
|
}) => {
|
||||||
const markdownBodyRef = useRef<HTMLDivElement>(null)
|
const markdownBodyRef = useRef<HTMLDivElement>(null)
|
||||||
const currentLineMarkers = useRef<LineMarkers[]>()
|
const currentLineMarkers = useRef<LineMarkers[]>()
|
||||||
const hasNewYamlError = useRef(false)
|
|
||||||
const tocAst = useRef<TocAst>()
|
const tocAst = useRef<TocAst>()
|
||||||
const [trimmedContent, contentExceedsLimit] = useTrimmedContent(content)
|
const [trimmedContent, contentExceedsLimit] = useTrimmedContent(content)
|
||||||
|
|
||||||
const markdownIt = useMemo(
|
const markdownIt = useMemo(
|
||||||
() =>
|
() =>
|
||||||
new BasicMarkdownItConfigurator({
|
new BasicMarkdownItConfigurator({
|
||||||
onParseError: (errorState) => (hasNewYamlError.current = errorState),
|
|
||||||
onToc: (toc) => (tocAst.current = toc),
|
onToc: (toc) => (tocAst.current = toc),
|
||||||
onLineMarkers:
|
onLineMarkers:
|
||||||
onLineMarkerPositionChanged === undefined
|
onLineMarkerPositionChanged === undefined
|
||||||
|
|
|
@ -37,7 +37,6 @@ import { quoteExtra } from '../markdown-it-plugins/quote-extra'
|
||||||
import { documentTableOfContents } from '../markdown-it-plugins/document-table-of-contents'
|
import { documentTableOfContents } from '../markdown-it-plugins/document-table-of-contents'
|
||||||
|
|
||||||
export interface ConfiguratorDetails {
|
export interface ConfiguratorDetails {
|
||||||
onParseError: (error: boolean) => void
|
|
||||||
onToc: (toc: TocAst) => void
|
onToc: (toc: TocAst) => void
|
||||||
onLineMarkers?: (lineMarkers: LineMarkers[]) => void
|
onLineMarkers?: (lineMarkers: LineMarkers[]) => void
|
||||||
useAlternativeBreaks?: boolean
|
useAlternativeBreaks?: boolean
|
Loading…
Reference in a new issue