@diplodoc/transform 4.26.0 → 4.27.1-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -485,7 +485,7 @@ const defaultCssWhitelist = {
485
485
  '--method': true,
486
486
  };
487
487
 
488
- const yfmHtmlAttrs = ['note-type', 'yfm2xliff-explicit', 'term-key'];
488
+ const yfmHtmlAttrs = ['note-type', 'term-key'];
489
489
 
490
490
  const allowedTags = Array.from(
491
491
  new Set([...htmlTags, ...svgTags, ...sanitizeHtml.defaults.allowedTags]),
@@ -518,7 +518,7 @@ export const defaultOptions: SanitizeOptions = {
518
518
  function sanitizeStyleTags(dom: cheerio.CheerioAPI, cssWhiteList: CssWhiteList) {
519
519
  const styleTags = dom('style');
520
520
 
521
- styleTags.each((_index: number, element: cheerio.Element) => {
521
+ styleTags.each((_index, element) => {
522
522
  const styleText = dom(element).text();
523
523
 
524
524
  try {
@@ -10,10 +10,16 @@ export interface MarkdownIt extends DefaultMarkdownIt {
10
10
  assets?: string[];
11
11
  meta?: string[];
12
12
  }
13
+
13
14
  export interface StateCore extends DefaultStateCore {
14
15
  md: MarkdownIt;
15
16
  }
16
17
 
18
+ export interface CacheContext {
19
+ get(key: string): string | null | undefined;
20
+ set(key: string, value: string | null | undefined): void;
21
+ }
22
+
17
23
  export type HighlightLangMap = Record<string, LanguageFn>;
18
24
 
19
25
  export type Heading = {
@@ -49,6 +55,7 @@ export interface OptionsType {
49
55
  transformLink?: (href: string) => string;
50
56
  getPublicPath?: (options: OptionsType, href?: string) => string;
51
57
  renderInline?: boolean;
58
+ cache?: CacheContext;
52
59
  [x: string]: unknown;
53
60
  }
54
61