X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=www%2Fjssrc%2Fblerg%2FUtil.js;h=b3f5369c8bccdeea7ddf4aafd8153441cf57c751;hb=65a1f7dc82554486ffa9cc03eac29a7a1642f046;hp=1bfab4c10cebda7167981a6855b73445b67341d2;hpb=9818631aecddd827374a0c01b3ec287e7b018bb1;p=blerg.git diff --git a/www/jssrc/blerg/Util.js b/www/jssrc/blerg/Util.js index 1bfab4c..b3f5369 100644 --- a/www/jssrc/blerg/Util.js +++ b/www/jssrc/blerg/Util.js @@ -2,6 +2,15 @@ blerg = window.blerg || {}; blerg.Util = {}; +// Dirty, terrible shim for rewritten links below +blerg.Util.qlink = function() { + try { + location.href = event.target.href; + } catch(e) { } + enyo.$.blerg.bubble('onNavigate'); + return false; +} + blerg.Util.blergFormat = function(text) { var lines = text.split(/\r?\n/); if (lines[lines.length - 1] == '') @@ -67,8 +76,8 @@ blerg.Util.blergFormat = function(text) { l = l.replace(/([^\w\\]|^)\*(\w[^*]*)\*(\W|$)/g, '$1$2$3'); // Turn refs and tags into links - l = l.replace(/(\s|^)#([A-Za-z0-9_-]+)/g, '$1#$2'); - l = l.replace(/(\s|^)@([A-Za-z0-9_-]+)(\/\d+)?/g, '$1@$2'); + l = l.replace(/(\s|^)#([A-Za-z0-9_-]+)/g, '$1#$2'); + l = l.replace(/(\s|^)@([A-Za-z0-9_-]+)(\/\d+)?/g, '$1@$2'); // Create lists when lines begin with * if (l[0] == '*') {