<link type="text/css" rel="stylesheet" href="./images/markdown.css">
<style>
.MJXp-math.MJXp-display, .MJXc-display {
display:inline !important;
}
</style>
<!--
<link rel="stylesheet" type="text/css" href="https://raw.githubusercontent.com/sindresorhus/github-markdown-css/gh-pages/github-markdown.css">
-->
<script type="text/javascript" src="https://rawgit.com/softm/loader/master/loader.js"></script>
<!--
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
, skipTags: ["script","noscript","style","textarea","pre","code"]
,ignoreClass:"javascript|language-javascript|hljs"
, delimiters: [['$','$']]
});
// " delimiters: [['`','`'], ['$','$']]"" ```javascript 때문에 제외.
</script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML' async></script>
-->
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_HTML' async></script>
<script type="text/javascript">
if ( document.getElementsByClassName("markdown-body").length > 0 ) document.getElementsByClassName("markdown-body")[0].style.display="none";
window.onload = function () {
if ( document.getElementsByClassName("markdown-body").length > 0 ) {
loader.js(
[
"https://cdnjs.cloudflare.com/ajax/libs/showdown/1.8.6/showdown.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js",
"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"
],
[
function(e) {
console.log("1st",e);
},
function(e) {
console.log("2nd",e);
},
function(e) {
console.log("3rd",e);
var containers = document.querySelectorAll(".markdown-body");
//var containers = [container];
var sd = new showdown.Converter();
for (var i = 0; i < containers.length; i++) {
containers[i].innerHTML = sd.makeHtml(containers[i].innerHTML);
var codes = containers[i].querySelectorAll("pre code");
/*
codes.forEach(function(code) {
hljs.highlightBlock(code);
});
*/
/* unused window.setTimeout( function() {
(function () {
var head = document.getElementsByTagName("head")[0], script;
script = document.createElement("script");
script.type = "text/x-mathjax-config";
script[(window.opera ? "innerHTML" : "text")] =
"MathJax.Hub.Config({\n" +
" tex2jax: { inlineMath: [['$','$'], ['\\\\(','\\\\)']] },\n" +
' skipTags: ["script","noscript","style","textarea","pre","code"],\n' +
' ignoreClass:"javascript|language-javascript|hljs",\n' +
" delimiters: [['$','$']]" +
// " delimiters: [['`','`'], ['$','$']]"" ```javascript 때문에 제외.
"});";
head.appendChild(script);
script = document.createElement("script");
script.type = "text/javascript";
script.src = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML";
head.appendChild(script);
})();
},1000);*/
for(var j=0;j<codes.length;j++) {
var code = codes[j];
hljs.highlightBlock(code);
}
}
document.getElementsByClassName("markdown-body")[0].style.display="block";
}
],
false // default false
);
}
}
</script>
댓글