diff --git a/dist/showdown.esm.js b/dist/showdown.esm.js index 1a8e3bf7..c66670b5 100644 --- a/dist/showdown.esm.js +++ b/dist/showdown.esm.js @@ -1,4 +1,4 @@ -/*! showdown v 3.0.0-rc2 - 05-07-2026 */ +/*! showdown v 3.0.0-rc2 - 22-07-2026 */ const showdown = (function () { // noinspection HtmlRequiredLangAttribute @@ -12102,12 +12102,9 @@ showdown.subParser('makehtml.stripLinkDefinitions', function (text, options, glo text += '¨0'; let replaceFunc = function (wholeMatch, linkId, url, width, height, blankLines, title) { - - // if there aren't two instances of linkId it must not be a reference link so back out + // Always strip matching definitions; unused defs must produce no output + // (Markdown.pl / CommonMark). Do not require a second occurrence of linkId. linkId = showdown.helper.caseFold(linkId); - if (showdown.helper.caseFold(text).split(linkId).length - 1 < 2) { - return wholeMatch; - } let captureStartEvent = new showdown.Event('makehtml.stripLinkDefinitions.onCapture', wholeMatch); captureStartEvent diff --git a/dist/showdown.esm.min.js b/dist/showdown.esm.min.js index 1c2a55c0..8b78d29c 100644 --- a/dist/showdown.esm.min.js +++ b/dist/showdown.esm.min.js @@ -1,4 +1,4 @@ -/*! showdown v 3.0.0-rc2 - 05-07-2026 */ +/*! showdown v 3.0.0-rc2 - 22-07-2026 */ const He=(function(){function he(e){"use strict";let d={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},headerIds:{defaultValue:{},describe:"Controls the id attribute generated on headings. Accepts either `false` (no ids) or an object `{prefix, raw}`. `{}` (the default) generates github-compatible ids with no prefix. `prefix` (string) is prepended to every id. `raw: true` uses minimal sanitization (only spaces, ', \", > and < become dashes, including in any prefix) instead of the default github-compatible sanitization. WARNING: raw ids might be malformed",type:"object"},headerLevelStart:{defaultValue:1,describe:"The header blocks level start",type:"number"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},httpsAutoLinks:{defaultValue:!1,describe:"Use 'https://' for auto-generated links",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},strikethrough:{defaultValue:!0,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},footnotes:{defaultValue:!1,describe:"Turn on/off GFM footnotes support",type:"boolean"},smartIndentationFix:{defaultValue:!1,describe:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,describe:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,describe:"Parses simple line breaks as
",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,describe:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,describe:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",describe:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,describe:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,describe:"Support for HTML Tag escaping. ex: \\
foo\\
",type:"boolean"},emoji:{defaultValue:!1,describe:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,describe:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},ellipsis:{defaultValue:!0,describe:"Replaces three dots with the ellipsis unicode character",type:"boolean"},completeHTMLDocument:{defaultValue:!1,describe:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,describe:"Enable support for document metadata (defined at the top of the document between `\xAB\xAB\xAB` and `\xBB\xBB\xBB` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,describe:"Split adjacent blockquote blocks",type:"boolean"},moreStyling:{defaultValue:!1,describe:"Adds some useful styling css classes in the generated html",type:"boolean"},relativePathBaseUrl:{defaultValue:"",describe:"Prepends a base URL to relative paths",type:"string"},decodeEntities:{defaultValue:!1,describe:"Resolve HTML5 named and numeric character references to their characters (CommonMark behavior)",type:"boolean"},cmSpec:{defaultValue:!1,describe:"Enable CommonMark spec compliance: parse blocks (lists, block quotes, HTML blocks, containers, tabs) and inlines (emphasis, links, images, autolinks, raw HTML) per the CommonMark spec instead of Showdown's legacy matching",type:"boolean"},disallowRawHTML:{defaultValue:!1,describe:'Filter the GFM "disallowed raw HTML" tags (title, textarea, style, xmp, iframe, noembed, noframes, script, plaintext) by escaping their leading < to < in the output',type:"boolean"},safeMode:{defaultValue:!1,describe:"Defense-in-depth hardening for untrusted Markdown: (1) block dangerous URL schemes (javascript:, vbscript:, data: except data:image for image src) in generated links/images, and (2) escape ALL raw HTML tags so embedded