Skip to content
Snippets Groups Projects
Commit 9aa206df authored by echicken's avatar echicken
Browse files

Monospace '' replacements for console/frame and HTML.

parent 3e80028a
No related branches found
No related tags found
No related merge requests found
......@@ -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] });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment