X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=www%2Fjs%2Fblerg.js;h=2ee3467dcef8e2dc933364688cc9b4fc7b8a6436;hb=0a73588293307fc51c995bda6f98e082a61df89c;hp=737d84cefc2759b2060469a237219d311b60c71d;hpb=f13f6cbe98cab2e170fb714047cd794fbd39e228;p=blerg.git diff --git a/www/js/blerg.js b/www/js/blerg.js index 737d84c..2ee3467 100644 --- a/www/js/blerg.js +++ b/www/js/blerg.js @@ -252,6 +252,10 @@ function mangleRecord(record, template) { // Turn markdown links into links record.data = record.data.replace(/(\s|^)\[([^\]]+)\]\((https?:\/\/[a-zA-Z0-9.-]*[a-zA-Z0-9](\/[^)]*?)?)\)/, '$1$2'); + // Turn *foo* into italics and **foo** into bold + record.data = record.data.replace(/(\s)\*\*([^*]+)\*\*(\s)/, '$1$2$3'); + record.data = record.data.replace(/(\s)\*([^*]+)\*(\s)/, '$1$2$3'); + // Turn refs and tags into links record.data = record.data.replace(/(\s|^)#(\w+)/g, '$1#$2'); record.data = record.data.replace(/(\s|^)@(\w+)/g, '$1@$2');