Merge branch 'develop' of https://bdgit.trustie.net/hushasha/bigdata into develop

This commit is contained in:
huang 2017-06-19 15:08:17 +08:00
commit 44680d478c
3 changed files with 19 additions and 17 deletions

View File

@ -3,7 +3,7 @@
<%= stylesheet_link_tag '/editormd/css/editormd','/editormd/css/editormd.min.css' %>
<%= javascript_include_tag '/editormd/lib/marked.min.js','/editormd/lib/prettify.min.js','/editormd/lib/raphael.min.js','/editormd/lib/underscore.min.js','/editormd/lib/sequence-diagram.min.js',
'/editormd/lib/flowchart.min.js','/editormd/lib/jquery.flowchart.min.js','/editormd/editormd.js'%>
'/editormd/lib/flowchart.min.js','/editormd/lib/jquery.flowchart.min.js','/editormd/editormd.js' %>
<style>
.editormd-preview-container, .editormd-html-preview{
@ -118,19 +118,21 @@
</div>
<script type="text/javascript">
$(document).ready(function() {
var taskPassMD = editormd.markdownToHTML("challenge_task_pass", {
htmlDecode : "style,script,iframe", // you can filter tags decode
taskList : true,
tex : true, // 默认不解析
flowChart : true, // 默认不解析
sequenceDiagram : true // 默认不解析
});
var answerMD = editormd.markdownToHTML("tpm_answer_show", {
htmlDecode : "style,script,iframe", // you can filter tags decode
taskList : true,
tex : true, // 默认不解析
flowChart : true, // 默认不解析
sequenceDiagram : true // 默认不解析
editormd.loadKaTeX(function() {
var taskPassMD = editormd.markdownToHTML("challenge_task_pass", {
htmlDecode: "style,script,iframe", // you can filter tags decode
taskList: true,
tex: true, // 默认不解析
flowChart: true, // 默认不解析
sequenceDiagram: true // 默认不解析
});
var answerMD = editormd.markdownToHTML("tpm_answer_show", {
htmlDecode: "style,script,iframe", // you can filter tags decode
taskList: true,
tex: true, // 默认不解析
flowChart: true, // 默认不解析
sequenceDiagram: true // 默认不解析
});
});
});
</script>

View File

@ -4014,7 +4014,7 @@
var katexHandle = function() {
div.find("." + editormd.classNames.tex).each(function(){
var tex = $(this);
katex.render(tex.html().replace(/&lt;/g, "<").replace(/&gt;/g, ">"), tex[0]);
katex.render(tex.text(), tex[0]);
tex.find(".katex").css("font-size", "1.0em");
});
};
@ -4178,8 +4178,8 @@
// 使用国外的CDN加载速度有时会很慢或者自定义URL
// You can custom KaTeX load url.
editormd.katexURL = {
css : "//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min",
js : "//cdnjs.cloudflare.com/ajax/libs/KaTeX/0.3.0/katex.min"
css : "/katex/katex.min",
js : "/katex/katex.min"
};
editormd.kaTeXLoaded = false;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 45 KiB