提交 7c9f2d67 编写于 作者: Y Yu Yang 提交者: GitHub

Merge pull request #56 from PaddlePaddle/feature/using_gh_css

Fix bug in code
...@@ -51,6 +51,8 @@ marked.setOptions({ ...@@ -51,6 +51,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&/g, "&") code = code.replace(/&/g, "&")
code = code.replace(/>/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -239,6 +239,8 @@ marked.setOptions({ ...@@ -239,6 +239,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -51,6 +51,8 @@ marked.setOptions({ ...@@ -51,6 +51,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -50,6 +50,8 @@ marked.setOptions({ ...@@ -50,6 +50,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -595,6 +595,8 @@ marked.setOptions({ ...@@ -595,6 +595,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -50,6 +50,8 @@ marked.setOptions({ ...@@ -50,6 +50,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -50,6 +50,8 @@ marked.setOptions({ ...@@ -50,6 +50,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -529,6 +529,8 @@ marked.setOptions({ ...@@ -529,6 +529,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -738,6 +738,8 @@ marked.setOptions({ ...@@ -738,6 +738,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -50,6 +50,8 @@ marked.setOptions({ ...@@ -50,6 +50,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -482,6 +482,8 @@ marked.setOptions({ ...@@ -482,6 +482,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -432,6 +432,8 @@ marked.setOptions({ ...@@ -432,6 +432,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -50,6 +50,8 @@ marked.setOptions({ ...@@ -50,6 +50,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -50,6 +50,8 @@ marked.setOptions({ ...@@ -50,6 +50,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -526,6 +526,8 @@ marked.setOptions({ ...@@ -526,6 +526,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
...@@ -519,6 +519,8 @@ marked.setOptions({ ...@@ -519,6 +519,8 @@ marked.setOptions({
smartypants: true, smartypants: true,
highlight: function(code, lang) { highlight: function(code, lang) {
code = code.replace(/&amp;/g, "&") code = code.replace(/&amp;/g, "&")
code = code.replace(/&gt;/g, ">")
code = code.replace(/&lt;/g, "<")
return hljs.highlightAuto(code, [lang]).value; return hljs.highlightAuto(code, [lang]).value;
} }
}); });
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册