Text snippets are now rendered as text.

This commit is contained in:
Martin Mahner 2013-11-24 17:05:43 +01:00
parent 691c21dd0f
commit 6960f67026
3 changed files with 16 additions and 2 deletions

View file

@ -83,6 +83,7 @@ LEXER_LIST = getattr(settings, 'DPASTE_LEXER_LIST', (
('tcl', 'Tcl'),
('tcsh', 'Tcsh'),
('tex', 'TeX'),
('text', 'Text'),
('vb.net', 'VB.net'),
('vim', 'VimL'),
('xml', 'XML'),

View file

@ -88,6 +88,12 @@ tt strong {
display: none;
}
.snippet-rendered {
font-size: 16px;
line-height: 1.5em;
max-width: 700px;
}
div.tree{
margin: 0 0 15px 0;
line-height: 1.8em;
@ -223,4 +229,4 @@ pre .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
pre .vc { color: #f8f8f2 } /* Name.Variable.Class */
pre .vg { color: #f8f8f2 } /* Name.Variable.Global */
pre .vi { color: #f8f8f2 } /* Name.Variable.Instance */
pre .il { color: #ae81ff } /* Literal.Number.Integer.Long */
pre .il { color: #ae81ff } /* Literal.Number.Integer.Long */

View file

@ -63,7 +63,14 @@
<!-- ======================================================================
Snippet
======================================================================= -->
{% include "dpaste/snippet_pre.html" %}
{% if snippet.lexer == 'text' %}
<div class="snippet-rendered">
{{ snippet.content|linebreaks }}
</div>
{% else %}
{% include "dpaste/snippet_pre.html" %}
{% endif %}
<!-- ======================================================================
Snippet Reply