Added syntax highlighing for |code| cards.

This commit is contained in:
Nilesh PS
2017-02-26 13:38:55 +05:30
parent c037ddbedc
commit d2bd4fa9cf
5 changed files with 106 additions and 3 deletions

View File

@@ -57,7 +57,7 @@
{% if card.type == 1 %}
{{ card.back|replace("\n", "<br />")|safe }}
{% else %}
<pre>{{ card.back|safe }}</pre>
<pre><code>{{ card.back|safe }}</code></pre>
{% endif %}
</td>
</tr>

View File

@@ -5,6 +5,8 @@
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}"/>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='hightlight-theme-github.css') }}" />
<script src="{{ url_for('static', filename='highlight.pack.js') }}"></script>
</head>
<body>
<div class="container">

View File

@@ -47,7 +47,7 @@
</div>
{% endif %}
{% else %}
<pre>{{ card.back|safe }}</pre>
<pre><code>{{ card.back|safe }}</code></pre>
{% endif %}
</div>
</div>
@@ -100,4 +100,4 @@
</div>
</div>
{% endblock %}
{% endblock %}