1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00

[md] modified js for history/shared file view

This commit is contained in:
llj
2013-03-28 15:40:15 +08:00
parent 313bb929bd
commit 2283a16f79
2 changed files with 4 additions and 2 deletions

View File

@@ -46,7 +46,8 @@ window.onload = function () {
{% if filetype == 'Markdown' %}
{% ifnotequal file_content None %}
var converter = new Showdown.converter();
var converter = new Markdown.Converter();
Markdown.Extra.init(converter, {extensions: ["fenced_code_gfm"]});
$('#md-view').html(converter.makeHtml('{{ file_content|escapejs }}')).children(':first').css('margin-top', '0');
{% endifnotequal %}
{% endif %}

View File

@@ -11,5 +11,6 @@
<script src="{{MEDIA_URL}}js/mediaelement-and-player.min.js"></script>
{% endif %}
{% if filetype == 'Markdown' %}
<script type="text/javascript" src="{{MEDIA_URL}}js/showdown.js"></script>
<script type="text/javascript" src="{{MEDIA_URL}}js/Markdown.Converter.js"></script>
<script type="text/javascript" src="{{MEDIA_URL}}js/Markdown.Extra.js"></script>
{% endif %}