mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 16:12:51 +11:00
Text snippets are now rendered as text.
This commit is contained in:
parent
691c21dd0f
commit
6960f67026
3 changed files with 16 additions and 2 deletions
|
@ -83,6 +83,7 @@ LEXER_LIST = getattr(settings, 'DPASTE_LEXER_LIST', (
|
||||||
('tcl', 'Tcl'),
|
('tcl', 'Tcl'),
|
||||||
('tcsh', 'Tcsh'),
|
('tcsh', 'Tcsh'),
|
||||||
('tex', 'TeX'),
|
('tex', 'TeX'),
|
||||||
|
('text', 'Text'),
|
||||||
('vb.net', 'VB.net'),
|
('vb.net', 'VB.net'),
|
||||||
('vim', 'VimL'),
|
('vim', 'VimL'),
|
||||||
('xml', 'XML'),
|
('xml', 'XML'),
|
||||||
|
|
|
@ -88,6 +88,12 @@ tt strong {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.snippet-rendered {
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 1.5em;
|
||||||
|
max-width: 700px;
|
||||||
|
}
|
||||||
|
|
||||||
div.tree{
|
div.tree{
|
||||||
margin: 0 0 15px 0;
|
margin: 0 0 15px 0;
|
||||||
line-height: 1.8em;
|
line-height: 1.8em;
|
||||||
|
|
|
@ -63,7 +63,14 @@
|
||||||
<!-- ======================================================================
|
<!-- ======================================================================
|
||||||
Snippet
|
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
|
Snippet Reply
|
||||||
|
|
Loading…
Reference in a new issue