mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: Markdown formatting error
This commit is contained in:
parent
26a5856a71
commit
91679c61d5
1 changed files with 7 additions and 5 deletions
12
vendor/assets/javascripts/better_markdown.js
vendored
12
vendor/assets/javascripts/better_markdown.js
vendored
|
@ -1354,12 +1354,14 @@
|
||||||
// [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 ) };
|
||||||
|
|
||||||
link = [ "link_ref", attrs ].concat( children );
|
if (children && children.length > 0) {
|
||||||
|
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
|
||||||
// found till after. Check it in md tree->hmtl tree conversion.
|
// found till after. Check it in md tree->hmtl tree conversion.
|
||||||
// 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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue