diff --git a/src/js/vue-plugins/strip-markdown.js b/src/js/vue-plugins/strip-markdown.js index a52a6b1212..71abff923e 100644 --- a/src/js/vue-plugins/strip-markdown.js +++ b/src/js/vue-plugins/strip-markdown.js @@ -5,6 +5,7 @@ export default function install(Vue) { return value .replace(/\[([^\]]+)\]\([^)]+\)/g, '$1') // external links .replace(/\[\[[^|]+|([^\]]+)\]\]/g, '$1') // internal links - .replace(/[*_\-#~`]/g, ''); // emphasis, lists and other similar stuff + .replace(/([\\s\n])-(\\s\n)/g, '$1$2') // dash, but only when preceded and followed by a space chare or line return + .replace(/[*_\\#~`]/g, ''); // emphasis and other similar stuff }); }