|
|
|
@ -10,10 +10,14 @@
|
|
|
|
|
</span> |
|
|
|
|
</div> |
|
|
|
|
<br/> |
|
|
|
|
<div class="paste"> |
|
|
|
|
% my $paste = (stash 'paste') || {}; |
|
|
|
|
% my $syntax = $paste->{syntax}; |
|
|
|
|
% my @opts = ($syntax and $syntax ne 'auto') ? (class => $syntax) : (); |
|
|
|
|
<div> |
|
|
|
|
<pre><%= tag 'code' => (@opts) => $paste->{data}; %></pre> |
|
|
|
|
% if (not $paste->{syntax} or $paste->{syntax} eq 'plaintext') { |
|
|
|
|
%= b(plaintext($paste->{data})); |
|
|
|
|
% } elsif ($paste->{syntax} eq 'markdown') { |
|
|
|
|
%= b(markdown($paste->{data})); |
|
|
|
|
% } else { |
|
|
|
|
<pre><%= tag 'code' => (class => $paste->{syntax}) => $paste->{data}; %></pre> |
|
|
|
|
% } |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|