We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcdc554 commit d4ffcabCopy full SHA for d4ffcab
src/common/helper.js
@@ -1960,8 +1960,8 @@ function removeTextFormatting (text) {
1960
// Remove footnotes
1961
text = _.replace(text, /\[\^.+?\](: .*?$)?/g, ' ')
1962
text = _.replace(text, /\s{0,2}\[.*?\]: .*?$/g, ' ')
1963
- // Remove images
1964
- text = _.replace(text, /!\[(.*?)\][[(].*?[\])]/g, ' $1 ')
+ // Remove images and keep description unless it is default description "image"
+ text = _.replace(text, /!(\[((?!image).*?)\]|\[.*?\])[[(].*?[\])]/g, ' $2 ')
1965
// Remove inline links
1966
text = _.replace(text, /\[(.*?)\][[(].*?[\])]/g, ' $1 ')
1967
// Remove blockquotes
0 commit comments