moved alertContainer to basic renderer from full renderer (#736)

This commit is contained in:
Philip Molares 2020-10-31 20:22:55 +01:00 committed by GitHub
parent 433985f508
commit c9fe4e4887
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 5 deletions

View file

@ -3,7 +3,6 @@ import { Table } from 'react-bootstrap'
import { Trans, useTranslation } from 'react-i18next'
import { BasicMarkdownRenderer } from '../../../markdown-renderer/basic-markdown-renderer'
import { BasicMarkdownItConfigurator } from '../../../markdown-renderer/markdown-it-configurator/BasicMarkdownItConfigurator'
import { alertContainer } from '../../../markdown-renderer/markdown-it-plugins/alert-container'
import { HighlightedCode } from '../../../markdown-renderer/replace-components/highlighted-fence/highlighted-code/highlighted-code'
import './cheatsheet.scss'
@ -32,7 +31,6 @@ export const Cheatsheet: React.FC = () => {
const markdownIt = useMemo(() => {
return new BasicMarkdownItConfigurator()
.pushConfig(alertContainer)
.buildConfiguredMarkdownIt()
}, [])

View file

@ -7,6 +7,7 @@ import inserted from 'markdown-it-ins'
import marked from 'markdown-it-mark'
import subscript from 'markdown-it-sub'
import superscript from 'markdown-it-sup'
import { alertContainer } from '../markdown-it-plugins/alert-container'
import { linkifyExtra } from '../markdown-it-plugins/linkify-extra'
import { MarkdownItParserDebugger } from '../markdown-it-plugins/parser-debugger'
import { twitterEmojis } from '../markdown-it-plugins/twitter-emojis'
@ -23,7 +24,8 @@ export class BasicMarkdownItConfigurator extends MarkdownItConfigurator {
inserted,
marked,
footnote,
imsize
imsize,
alertContainer
)
this.postConfigurations.push(
linkifyExtra,

View file

@ -1,7 +1,6 @@
import MarkdownIt from 'markdown-it'
import { TocAst } from '../../../external-types/markdown-it-toc-done-right/interface'
import { RawYAMLMetadata } from '../../editor/yaml-metadata/yaml-metadata'
import { alertContainer } from '../markdown-it-plugins/alert-container'
import { documentToc } from '../markdown-it-plugins/document-toc'
import { frontmatterExtract } from '../markdown-it-plugins/frontmatter'
import { headlineAnchors } from '../markdown-it-plugins/headline-anchors'
@ -58,7 +57,6 @@ export class FullMarkdownItConfigurator extends BasicMarkdownItConfigurator {
highlightedCode,
quoteExtra,
(markdownIt) => documentToc(markdownIt, this.onToc),
alertContainer,
(markdownIt) => lineNumberMarker(markdownIt, (lineMarkers) => this.onLineMarkers(lineMarkers))
)
}