dbot/views/quotes.jade
Alexander D Brown 52cdddf3f7 Added in URL support for the web interface.
The Jade templating code in `views/quotes.jade` will now check against the Regular Expression which has been added to `snippets.js` and is delivered to the template by `modules/web.js`.

The reguar expression used should be able to handle any URL and ensure no non-URL elements are made into URLs. It may be worth adding checking for 4XX error codes at a later date.

This shouldn't affect any of the other modules; features have only been added, not modified.
2011-11-09 23:51:01 +00:00

8 lines
187 B
Plaintext

div#quotelist
-each quote in quotes
-if(quote.match(locals.url_regex))
div.quote
a(href=quote)=quote
-else
div.quote #{quote}