All files / src markdown-engine-config.ts

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92                                                                                        1x                                                                                              
export type MathRenderingOption = "None" | "KaTeX" | "MathJax";
 
export interface MarkdownEngineConfig {
  configPath?: string;
  usePandocParser?: boolean;
  breakOnSingleNewLine?: boolean;
  enableTypographer?: boolean;
  enableWikiLinkSyntax?: boolean;
  enableLinkify?: boolean;
  wikiLinkFileExtension?: string;
  enableEmojiSyntax?: boolean;
  enableExtendedTableSyntax?: boolean;
  enableCriticMarkupSyntax?: boolean;
  protocolsWhiteList?: string;
  mathRenderingOption?: MathRenderingOption;
  mathInlineDelimiters?: string[][];
  mathBlockDelimiters?: string[][];
  mathRenderingOnlineService?: string;
  codeBlockTheme?: string;
  previewTheme?: string;
  revealjsTheme?: string;
  mermaidTheme?: string;
  frontMatterRenderingOption?: string;
  imageFolderPath?: string;
  printBackground?: boolean;
  chromePath?: string;
  imageMagickPath?: string;
  pandocPath?: string;
  pandocMarkdownFlavor?: string;
  pandocArguments?: string[];
  latexEngine?: string;
  enableScriptExecution?: boolean;
  enableHTML5Embed?: boolean;
  HTML5EmbedUseImageSyntax?: boolean;
  HTML5EmbedUseLinkSyntax?: boolean;
  HTML5EmbedIsAllowedHttp?: boolean;
  HTML5EmbedAudioAttributes?: string;
  HTML5EmbedVideoAttributes?: string;
  puppeteerWaitForTimeout?: number;
  usePuppeteerCore?: boolean;
  puppeteerArgs?: string[];
  renderRefWithOutline?: boolean;
}
 
export const defaultMarkdownEngineConfig: MarkdownEngineConfig = {
  configPath: null,
  usePandocParser: false,
  breakOnSingleNewLine: true,
  enableTypographer: false,
  enableWikiLinkSyntax: true,
  enableLinkify: true,
  enableEmojiSyntax: true,
  enableExtendedTableSyntax: false,
  enableCriticMarkupSyntax: false,
  wikiLinkFileExtension: ".md",
  protocolsWhiteList: "http://, https://, atom://, file://, mailto:, tel:",
  mathRenderingOption: "KaTeX",
  mathInlineDelimiters: [
    ["$", "$"],
    ["\\(", "\\)"],
  ],
  mathBlockDelimiters: [
    ["$$", "$$"],
    ["\\[", "\\]"],
  ],
  mathRenderingOnlineService: "https://latex.codecogs.com/gif.latex",
  codeBlockTheme: "auto.css",
  previewTheme: "github-light.css",
  revealjsTheme: "white.css",
  mermaidTheme: "default",
  frontMatterRenderingOption: "none",
  imageFolderPath: "/assets",
  printBackground: false,
  chromePath: "",
  imageMagickPath: "",
  pandocPath: "pandoc",
  pandocMarkdownFlavor: "markdown-raw_tex+tex_math_single_backslash",
  pandocArguments: [],
  latexEngine: "pdflatex",
  enableScriptExecution: false,
  enableHTML5Embed: false,
  HTML5EmbedUseImageSyntax: true,
  HTML5EmbedUseLinkSyntax: false,
  HTML5EmbedIsAllowedHttp: false,
  HTML5EmbedAudioAttributes: 'controls preload="metadata"',
  HTML5EmbedVideoAttributes: 'controls preload="metadata"',
  puppeteerWaitForTimeout: 0,
  usePuppeteerCore: true,
  puppeteerArgs: [],
  renderRefWithOutline: true,
};