Add prettier for codestyle and re-format everything ()

This commit is contained in:
Erik Michelson 2021-06-06 23:14:00 +02:00 committed by GitHub
parent 8b78154075
commit 0aae1f70d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
319 changed files with 4809 additions and 3936 deletions
src/components/markdown-renderer/markdown-it-configurator

View file

@ -39,10 +39,10 @@ import { documentTableOfContents } from '../markdown-it-plugins/document-table-o
import { frontmatterExtract } from '../markdown-it-plugins/frontmatter'
export interface ConfiguratorDetails {
useFrontmatter: boolean,
onParseError: (error: boolean) => void,
onRawMetaChange: (rawMeta: RawNoteFrontmatter) => void,
onToc: (toc: TocAst) => void,
useFrontmatter: boolean
onParseError: (error: boolean) => void
onRawMetaChange: (rawMeta: RawNoteFrontmatter) => void
onToc: (toc: TocAst) => void
onLineMarkers?: (lineMarkers: LineMarkers[]) => void
useAlternativeBreaks?: boolean
}
@ -102,22 +102,22 @@ export class BasicMarkdownItConfigurator<T extends ConfiguratorDetails> {
imsize,
tasksLists,
alertContainer,
spoilerContainer)
spoilerContainer
)
if (this.options.useFrontmatter) {
this.configurations.push(frontmatterExtract({
onParseError: this.options.onParseError,
onRawMetaChange: this.options.onRawMetaChange
}))
this.configurations.push(
frontmatterExtract({
onParseError: this.options.onParseError,
onRawMetaChange: this.options.onRawMetaChange
})
)
}
if (this.options.onLineMarkers) {
this.configurations.push(lineNumberMarker(this.options.onLineMarkers))
}
this.postConfigurations.push(
linkifyExtra,
MarkdownItParserDebugger
)
this.postConfigurations.push(linkifyExtra, MarkdownItParserDebugger)
}
}