{
  "version": 3,
  "sources": ["../../../src/api/raw-handling/markdown-converter.ts"],
  "sourcesContent": ["/**\n * External dependencies\n */\n// @ts-ignore\nimport showdown from 'showdown';\n\n// Reuse the same showdown converter.\nconst converter = new showdown.Converter( {\n\tnoHeaderId: true,\n\ttables: true,\n\tliteralMidWordUnderscores: true,\n\tomitExtraWLInCodeBlocks: true,\n\tsimpleLineBreaks: true,\n\tstrikethrough: true,\n} );\n\n/**\n * Corrects the Slack Markdown variant of the code block.\n * If uncorrected, it will be converted to inline code.\n *\n * @see https://get.slack.help/hc/en-us/articles/202288908-how-can-i-add-formatting-to-my-messages-#code-blocks\n *\n * @param text The potential Markdown text to correct.\n *\n * @return The corrected Markdown.\n */\nfunction slackMarkdownVariantCorrector( text: string ): string {\n\treturn text.replace(\n\t\t/((?:^|\\n)```)([^\\n`]+)(```(?:$|\\n))/,\n\t\t( match, p1, p2, p3 ) => `${ p1 }\\n${ p2 }\\n${ p3 }`\n\t);\n}\n\nfunction bulletsToAsterisks( text: string ): string {\n\treturn text.replace( /(^|\\n)\u2022( +)/g, '$1*$2' );\n}\n\n/**\n * Converts a piece of text into HTML based on any Markdown present.\n * Also decodes any encoded HTML.\n *\n * @param text The plain text to convert.\n *\n * @return HTML.\n */\nexport default function markdownConverter( text: string ): string {\n\treturn converter.makeHtml(\n\t\tslackMarkdownVariantCorrector( bulletsToAsterisks( text ) )\n\t);\n}\n"],
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,sBAAqB;AAGrB,IAAM,YAAY,IAAI,gBAAAA,QAAS,UAAW;AAAA,EACzC,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,2BAA2B;AAAA,EAC3B,yBAAyB;AAAA,EACzB,kBAAkB;AAAA,EAClB,eAAe;AAChB,CAAE;AAYF,SAAS,8BAA+B,MAAuB;AAC9D,SAAO,KAAK;AAAA,IACX;AAAA,IACA,CAAE,OAAO,IAAI,IAAI,OAAQ,GAAI,EAAG;AAAA,EAAM,EAAG;AAAA,EAAM,EAAG;AAAA,EACnD;AACD;AAEA,SAAS,mBAAoB,MAAuB;AACnD,SAAO,KAAK,QAAS,gBAAgB,OAAQ;AAC9C;AAUe,SAAR,kBAAoC,MAAuB;AACjE,SAAO,UAAU;AAAA,IAChB,8BAA+B,mBAAoB,IAAK,CAAE;AAAA,EAC3D;AACD;",
  "names": ["showdown"]
}
