UNPKG

ts-markdown-parser

Version:

TypeScript library that converts markdown to HTML (with code support).

32 lines 1.21 kB
export declare const languageAliases: Record<string, string>; export interface MultilineCommentRegex { start: RegExp; end: RegExp; } export declare const getMultilineCommentRegex: (language: string) => MultilineCommentRegex | null; export declare const highlightCode: (language: string, code: string) => string; /** * Removes leading whitespace and newline characters from a string * until a non-whitespace/non-newline character is encountered. * * @param str - The input string to be processed. * @returns A string with leading whitespace/newlines removed. */ export declare const stripLeadingWhitespace: (str: string) => string; /** * Counts the occurrences of a target, trimmed string in an array. * * @param {string[]} arr * @returns {number} */ export declare const countOccurrences: (arr: string[], target: string) => number; /** * Replaces specified characters in a string, ignoring any characters that are part of HTML entities. * * @param {string} text * @param {string} replaceRegex * @param {string} replacement * @returns {string} */ export declare const markdownReplace: (text: string, replaceRegex: RegExp, replacement: string) => string; //# sourceMappingURL=index.d.ts.map