import MarkdownIt from 'markdown-it'; import iterator from 'markdown-it-for-inline'; // Put a transparent pixel instead of the "open in new window" icon, so developers can easily modify the icon in CSS. const TRANSPARENT_GIF = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; type AttributeSetter = false | string | ((value?: string) => string); type Decoration = { /** Value of "aria-label" attribute of the link. If set to `false`, remove existing attribute. */ ariaLabel?: AttributeSetter; /** Turns this link into a