mirror of
https://github.com/discourse/discourse.git
synced 2025-06-14 18:07:51 +08:00
FIX: Markdown formatting error
This commit is contained in:
2
vendor/assets/javascripts/better_markdown.js
vendored
2
vendor/assets/javascripts/better_markdown.js
vendored
@ -1354,6 +1354,7 @@
|
|||||||
// [links][] uses links as its reference
|
// [links][] uses links as its reference
|
||||||
attrs = { ref: ( m[ 1 ] || String(children) ).toLowerCase(), original: orig.substr( 0, consumed ) };
|
attrs = { ref: ( m[ 1 ] || String(children) ).toLowerCase(), original: orig.substr( 0, consumed ) };
|
||||||
|
|
||||||
|
if (children && children.length > 0) {
|
||||||
link = [ "link_ref", attrs ].concat( children );
|
link = [ "link_ref", attrs ].concat( children );
|
||||||
|
|
||||||
// We can't check if the reference is known here as it likely wont be
|
// We can't check if the reference is known here as it likely wont be
|
||||||
@ -1361,6 +1362,7 @@
|
|||||||
// Store the original so that conversion can revert if the ref isn't found.
|
// Store the original so that conversion can revert if the ref isn't found.
|
||||||
return [ consumed, link ];
|
return [ consumed, link ];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Another check for references
|
// Another check for references
|
||||||
m = orig.match(/^\s*\[(.*?)\]:\s*(\S+)(?:\s+(?:(['"])(.*?)\3|\((.*?)\)))?\n?/);
|
m = orig.match(/^\s*\[(.*?)\]:\s*(\S+)(?:\s+(?:(['"])(.*?)\3|\((.*?)\)))?\n?/);
|
||||||
|
Reference in New Issue
Block a user