{% set page_name = 'paste' %} {% extends 'layouts/text.html' %} {% if highlighter.is_diff %} {% set extra_html_classes = "diff-side-by-side" %} {% endif %} {# Terminal output gets its own preferred theme setting, since many people seem to prefer a dark background for terminal output, but a light background for regular code. #} {% if highlighter.is_terminal_output %} {% set preferredStyleVar = 'preferredStyleTerminal' %} {% set defaultStyle = 'monokai' %} {% else %} {% set preferredStyleVar = 'preferredStyle' %} {% set defaultStyle = 'default' %} {% endif %} {% block highlight_class %}highlight-{{defaultStyle}}{% endblock %} {% block extra_head %} {% endblock %} {% block info %} {% if texts|length == 1 %} {{num_lines(texts[0])}} {{'line'|pluralize(num_lines(texts[0]))}} of {% endif %} {{highlighter.name}} {% endblock %} {% block highlight_start %} {{inline_js('paste-inline-start.js')}} {% endblock %} {% block text %} {% for text in texts %}
{% for i in range(1, num_lines(text) + 1) %} {{i}} {% endfor %}
{{highlighter.highlight(text)|safe}}
{% endfor %} {% endblock %} {% block extra_toolbar %} {% if highlighter.is_diff %}
Side-by-Side
Unified
{# This is an inline script so that it can apply the right CSS before rendering the diff and avoid flashing the wrong diff style on load. #} {% endif %} {% endblock %} {% block inline_js %} {{inline_js('paste-inline.js')}} {% endblock %}