lib/carte/client/helpers.coffee in carte-server-1.0.9 vs lib/carte/client/helpers.coffee in carte-server-1.0.10

- old
+ new

@@ -3,5 +3,12 @@ reload: ()-> Backbone.history.loadUrl() isMobile: ()-> /(iPhone|iPod|iPad).*AppleWebKit/i.test(navigator.userAgent) + + parseCardLink: (html)-> + html.replace /\[\[(.+?)\]\]/g, (match, p1)-> + if p1.match /<("[^"]*"|'[^']*'|[^'">])*>/g + match + else + ['<a href="#/', encodeURIComponent(p1), '">', p1, '</a>'].join('')