chore: fix typo

pull/7/head
Evan You 5 years ago
parent dd04101316
commit 49fc3cdb2b

@ -16,7 +16,7 @@ const emoji = require('markdown-it-emoji')
const anchor = require('markdown-it-anchor')
const toc = require('markdown-it-table-of-contents')
export interface MarkdownOpitons extends MarkdownIt.Options {
export interface MarkdownOptions extends MarkdownIt.Options {
lineNumbers?: boolean
config?: (md: MarkdownIt) => void
anchor?: {
@ -41,7 +41,7 @@ export interface MarkdownRenderer {
}
export const createMarkdownRenderer = (
options: MarkdownOpitons = {}
options: MarkdownOptions = {}
): MarkdownRenderer => {
const md = MarkdownIt({
html: true,
@ -50,8 +50,7 @@ export const createMarkdownRenderer = (
})
// custom plugins
md
.use(componentPlugin)
md.use(componentPlugin)
.use(highlightLinePlugin)
.use(preWrapperPlugin)
.use(snippetPlugin)
@ -102,7 +101,7 @@ export const createMarkdownRenderer = (
// wrap render so that we can return both the html and extracted data.
const render = md.render
const wrappedRender: MarkdownRenderer['render'] = (src) => {
(md as any).__data = {}
;(md as any).__data = {}
const html = render.call(md, src)
return {
html,

@ -1,7 +1,7 @@
import path from 'path'
import matter from 'gray-matter'
import LRUCache from 'lru-cache'
import { createMarkdownRenderer, MarkdownOpitons } from './markdown/markdown'
import { createMarkdownRenderer, MarkdownOptions } from './markdown/markdown'
import { deeplyParseHeader } from './utils/parseHeader'
import { PageData } from './config'
@ -15,7 +15,7 @@ interface MarkdownCompileResult {
export function createMarkdownToVueRenderFn(
root: string,
options: MarkdownOpitons = {}
options: MarkdownOptions = {}
) {
const md = createMarkdownRenderer(options)

Loading…
Cancel
Save