版博士V2.0程序
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

42 rader
1.4 KiB

  1. import Prism from 'prismjs';
  2. import MarkdownIt from 'markdown-it';
  3. interface Options {
  4. /**
  5. * Whether to highlight inline code. Defaults to `false`.
  6. */
  7. highlightInlineCode: boolean;
  8. /**
  9. * Prism plugins to load.
  10. */
  11. plugins: string[];
  12. /**
  13. * Callback for Prism initialisation. Useful for initialising plugins.
  14. * @param prism The Prism instance that will be used by the plugin.
  15. */
  16. init: (prism: typeof Prism) => void;
  17. /**
  18. * The language to use for code blocks that specify a language that Prism does not know.
  19. */
  20. defaultLanguageForUnknown?: string;
  21. /**
  22. * The language to use for code blocks that do not specify a language.
  23. */
  24. defaultLanguageForUnspecified?: string;
  25. /**
  26. * Shorthand to set both {@code defaultLanguageForUnknown} and {@code defaultLanguageForUnspecified} to the same value. Will be copied
  27. * to each option if it is set to {@code undefined}.
  28. */
  29. defaultLanguage?: string;
  30. }
  31. /**
  32. * Initialisation function of the plugin. This function is not called directly by clients, but is rather provided
  33. * to MarkdownIt’s {@link MarkdownIt.use} function.
  34. *
  35. * @param markdownit
  36. * The markdown it instance the plugin is being registered to.
  37. * @param useroptions
  38. * The options this plugin is being initialised with.
  39. */
  40. export default function markdownItPrism(markdownit: MarkdownIt, useroptions: Options): void;
  41. export {};