| | |
| | | import smartypants from 'remark-smartypants' |
| | | import { QuartzTransformerPlugin } from "../types" |
| | | import rehypeSlug from "rehype-slug" |
| | | import rehypeAutolinkHeadings from "rehype-autolink-headings/lib" |
| | | import rehypeAutolinkHeadings from "rehype-autolink-headings" |
| | | |
| | | export interface Options { |
| | | enableSmartyPants: boolean |
| | |
| | | name = "GitHubFlavoredMarkdown" |
| | | opts: Options |
| | | |
| | | constructor(opts?: Options) { |
| | | constructor(opts?: Partial<Options>) { |
| | | super() |
| | | this.opts = { ...defaultOptions, ...opts } |
| | | } |
| | |
| | | ? [rehypeSlug, [rehypeAutolinkHeadings, { |
| | | behavior: 'append', content: { |
| | | type: 'text', |
| | | value: '§' |
| | | value: ' §' |
| | | } |
| | | }]] |
| | | : [] |