Markdown Stylize Config
About 1 min
The following options adds new stylize feature, and can be set under markdown
property in theme options.
markdown.align
- Type:
boolean
- Default:
false
- Details:
Whether to enable custom align.
markdown.attrs
Type:
MarkdownItAttrsOptions | boolean
interface MarkdownItAttrsOptions { /** * left delimiter * * @default '{' */ left?: string; /** * right delimiter * * @default '}' */ right?: string; /** * allowed attributes * * @description An empty list means allowing all attribute * * @default [] */ allowed?: (string | RegExp)[]; /** * Rules to enable * * @default "all" */ rule?: "all" | boolean | MarkdownItAttrRuleName[]; }
Default:
false
Details:
Whether to enable attribute customize support.
markdown.mark
- Type:
boolean
- Default:
false
- Details:
Whether to enable mark support.
markdown.sup
- Type:
boolean
- Default:
false
- Details:
Whether to enable the superscript support.
markdown.sub
- Type:
boolean
- Default:
false
- Details:
Whether to enable subscript support.
markdown.spoiler
- Type:
boolean
- Default:
false
- Details:
Whether to enable spoiler support.
markdown.stylize
Type:
MarkdownItStylizeConfig[] | false
interface MarkdownItStylizeResult { /** * Tag name */ tag: string; /** * Attributes settings */ attrs: Record<string, string>; /** * Tag content */ content: string; } interface MarkdownItStylizeConfig { /** * Inline token matcher */ matcher: string | RegExp; /** * Content Replacer */ replacer: (options: { tag: string; content: string; attrs: Record<string, string>; env?: any; }) => MarkdownItStylizeResult | null | undefined | void; }
Default:
false
Details:
Stylize inline tokens to create snippet you want.