Mercurial > zeropaste
view app/assets/javascripts/zp.formatter.coffee @ 373:6e3e1e7b0212
Handle unique error in model instead of controller.
author | nanaya <me@myconan.net> |
---|---|
date | Sat, 06 Jun 2015 22:12:56 +0900 |
parents | 5a4d31e97937 |
children |
line wrap: on
line source
#= require config/marked #= require config/prettify window.zp.formatter = raw: -> $("#pl pre").text() links: -> $("#paste-mode a") current: -> $("#paste-mode .active a").attr("href").slice(1) markdown: -> $("#md div") .html(marked @raw()) .find("pre").addClass "prettyprint" .end() .find("a").prop "rel", "nofollow" highlight: -> $("#hl pre").text @raw() prettyPrint() init: -> @markdown() @highlight()