diff --git a/exec/load/markdown.js b/exec/load/markdown.js index 3d6ee9b2bb1800543246c990488b173e8dd51ad8..50c4559d413afbfb91284500dc55a73ceeed77a4 100644 --- a/exec/load/markdown.js +++ b/exec/load/markdown.js @@ -9,7 +9,6 @@ * ** bold ** * // italic // * __ underline __ - * To-do: monospace '' text * > blockquote * To-do: nested blockquote in HTML * * Unordered lists @@ -136,6 +135,9 @@ Markdown.prototype.render_text_console = function (text) { ret = ret.replace(/__([^_]+)__/g, function (m, c) { return '\1+' + self.config.console.underline_style + c + '\1-'; }); + ret = ret.replace(/''([^']+)''/g, function (m, c) { + return c; + }); ret = ret.replace(/\{\{(.+)\}\}/g, function (m, c) { c = c.split('|'); self.state.images.push({ text : (c[1] || c[0]), link : c[0] }); @@ -163,6 +165,9 @@ Markdown.prototype.render_text_html = function (text) { ret = ret.replace(/__([^_]+)__/g, function (m, c) { return '<span style="text-decoration:underline;">' + c + '</span>'; }); + ret = ret.replace(/''([^']+)''/g, function (m, c) { + return '<code>' + c + '</code>'; + }); ret = ret.replace(/\{\{(.+)\}\}/g, function (m, c) { c = c.split('|'); return self.html_tag_format('img', { alt : (c[1] || c[0]), src : c[0] });