|  | 
| 1 | 1 | <!DOCTYPE html> | 
| 2 | 2 | <html lang="en"> | 
|  | 3 | +  <head> | 
|  | 4 | +    <meta charset="UTF-8" /> | 
|  | 5 | +    <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | 
|  | 6 | +    <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | 
| 3 | 7 | 
 | 
| 4 |  | -<head> | 
| 5 |  | -    <meta charset="UTF-8"> | 
| 6 |  | -    <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 
| 7 |  | -    <meta name="viewport" content="width=device-width, initial-scale=1.0"> | 
|  | 8 | +    <meta name="fetch" content="true" /> | 
| 8 | 9 | 
 | 
| 9 |  | -    <meta name="fetch" content="true"> | 
| 10 |  | - | 
| 11 |  | -    <meta name="description" content="Write Markdown as task-descriptions for your students, this markdown interpreter additionally allows to integrate formulas, ASCII-art and videos. For more information, see <br><a href='https://github.com/Cross-Lab-Project/edrys_module-markdown-it' target='_blank'>https://github.com/Cross-Lab-Project/edrys_module-markdown-it</a>" /> | 
|  | 10 | +    <meta | 
|  | 11 | +      name="description" | 
|  | 12 | +      content="Write Markdown as task-descriptions for your students, this markdown interpreter additionally allows to integrate formulas, ASCII-art and videos. For more information, see <br><a href='https://github.com/Cross-Lab-Project/edrys_module-markdown-it' target='_blank'>https://github.com/Cross-Lab-Project/edrys_module-markdown-it</a>" | 
|  | 13 | +    /> | 
| 12 | 14 |     <meta name="show-in" content="*" /> | 
| 13 | 15 | 
 | 
| 14 |  | -    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css" /> | 
|  | 16 | +    <link | 
|  | 17 | +      rel="stylesheet" | 
|  | 18 | +      href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/styles/default.min.css" | 
|  | 19 | +    /> | 
| 15 | 20 |     <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.7.0/highlight.min.js"></script> | 
| 16 | 21 | 
 | 
| 17 |  | - | 
| 18 |  | -    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/markdown-it-texmath/css/texmath.min.css" /> | 
|  | 22 | +    <link | 
|  | 23 | +      rel="stylesheet" | 
|  | 24 | +      href="https://cdn.jsdelivr.net/npm/markdown-it-texmath/css/texmath.min.css" | 
|  | 25 | +    /> | 
| 19 | 26 |     <script src="https://cdn.jsdelivr.net/npm/markdown-it-texmath/texmath.min.js"></script> | 
| 20 |  | -    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css"> | 
|  | 27 | +    <link | 
|  | 28 | +      rel="stylesheet" | 
|  | 29 | +      href="https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css" | 
|  | 30 | +    /> | 
| 21 | 31 |     <script src="https://cdn.jsdelivr.net/npm/katex/dist/katex.min.js"></script> | 
| 22 | 32 | 
 | 
| 23 | 33 |     <script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/9.2.2/mermaid.min.js"></script> | 
| 24 | 34 |     <script src="dist/index.js"></script> | 
| 25 | 35 | 
 | 
| 26 | 36 |     <script src="https://cdnjs.cloudflare.com/ajax/libs/markdown-it/13.0.1/markdown-it.min.js"></script> | 
| 27 | 37 | 
 | 
| 28 |  | - | 
| 29 | 38 |     <script src="https://edrys-labs.github.io/module/edrys.js"></script> | 
| 30 |  | -    <script defer src="https://edrys-labs.github.io/module/vendor/alpine.min.js"></script> | 
| 31 |  | -    <link rel="stylesheet" href="https://edrys-labs.github.io/module/vendor/water.min.css" /> | 
| 32 |  | -    <link rel="stylesheet" href="https://edrys-labs.github.io/module/vendor/open-iconic/css/open-iconic.min.css" /> | 
|  | 39 | +    <script | 
|  | 40 | +      defer | 
|  | 41 | +      src="https://edrys-labs.github.io/module/vendor/alpine.min.js" | 
|  | 42 | +    ></script> | 
|  | 43 | +    <link | 
|  | 44 | +      rel="stylesheet" | 
|  | 45 | +      href="https://edrys-labs.github.io/module/vendor/water.min.css" | 
|  | 46 | +    /> | 
|  | 47 | +    <link | 
|  | 48 | +      rel="stylesheet" | 
|  | 49 | +      href="https://edrys-labs.github.io/module/vendor/open-iconic/css/open-iconic.min.css" | 
|  | 50 | +    /> | 
| 33 | 51 | 
 | 
| 34 | 52 |     <script> | 
| 35 |  | -        function init() { | 
| 36 |  | -            if (window.md) return | 
| 37 |  | - | 
| 38 |  | -            if (!window.markdownItTextualUml) { | 
| 39 |  | -                setTimeout(init, 100) | 
| 40 |  | -                return | 
| 41 |  | -            } | 
| 42 |  | - | 
| 43 |  | -            window.md = markdownit() | 
| 44 |  | - | 
| 45 |  | -            // enable everything | 
| 46 |  | -            window.md.options.html = true | 
| 47 |  | -            window.md.options.linkify = true | 
| 48 |  | -            window.md.options.typographer = true | 
| 49 |  | - | 
| 50 |  | -            window.md.options.highlight = function (str, lang) { | 
| 51 |  | -                if (lang && hljs.getLanguage(lang)) { | 
| 52 |  | -                    try { | 
| 53 |  | -                        return '<pre class="hljs"><code style="border-radius: 0px">' + | 
| 54 |  | -                            hljs.highlight(str, { | 
| 55 |  | -                                language: lang, | 
| 56 |  | -                                ignoreIllegals: true | 
| 57 |  | -                            }).value + | 
| 58 |  | -                            '</code></pre>'; | 
| 59 |  | -                    } catch (__) {} | 
| 60 |  | -                } | 
| 61 |  | - | 
| 62 |  | -                return '<pre class="hljs"><code style="border-radius: 0px">' + md.utils.escapeHtml(str) + | 
| 63 |  | -                    '</code></pre>'; | 
| 64 |  | -            } | 
| 65 |  | - | 
| 66 |  | -            window.md.use( | 
| 67 |  | -                    texmath, { | 
| 68 |  | -                        engine: katex, | 
| 69 |  | -                        delimiters: 'dollars', | 
| 70 |  | -                        katexOptions: { | 
| 71 |  | -                            macros: { | 
| 72 |  | -                                "\\RR": "\\mathbb{R}" | 
| 73 |  | -                            } | 
| 74 |  | -                        } | 
| 75 |  | -                    }) | 
| 76 |  | -                .use(window.markdownItTextualUml) | 
|  | 53 | +      function init() { | 
|  | 54 | +        if (window.md) return | 
|  | 55 | + | 
|  | 56 | +        if (!window.markdownItTextualUml) { | 
|  | 57 | +          setTimeout(init, 100) | 
|  | 58 | +          return | 
| 77 | 59 |         } | 
| 78 | 60 | 
 | 
| 79 |  | -        function render(content) { | 
| 80 |  | -            if (window.md) { | 
| 81 |  | -                document.body.innerHTML = md.render(content) | 
| 82 |  | - | 
| 83 |  | -                setTimeout(() => { | 
| 84 |  | -                    console.warn("loading mermaid") | 
| 85 |  | -                    mermaid.initialize({ | 
| 86 |  | -                        startOnLoad: true | 
| 87 |  | -                    }) | 
| 88 |  | -                }, 1000) | 
| 89 |  | -            } else { | 
| 90 |  | -                setTimeout(() => { | 
| 91 |  | -                    render(content) | 
| 92 |  | -                }, 100) | 
| 93 |  | -            } | 
|  | 61 | +        window.md = markdownit() | 
|  | 62 | + | 
|  | 63 | +        // enable everything | 
|  | 64 | +        window.md.options.html = true | 
|  | 65 | +        window.md.options.linkify = true | 
|  | 66 | +        window.md.options.typographer = true | 
|  | 67 | + | 
|  | 68 | +        window.md.options.highlight = function (str, lang) { | 
|  | 69 | +          if (lang && hljs.getLanguage(lang)) { | 
|  | 70 | +            try { | 
|  | 71 | +              return ( | 
|  | 72 | +                '<pre class="hljs"><code style="border-radius: 0px">' + | 
|  | 73 | +                hljs.highlight(str, { | 
|  | 74 | +                  language: lang, | 
|  | 75 | +                  ignoreIllegals: true, | 
|  | 76 | +                }).value + | 
|  | 77 | +                '</code></pre>' | 
|  | 78 | +              ) | 
|  | 79 | +            } catch (__) {} | 
|  | 80 | +          } | 
|  | 81 | + | 
|  | 82 | +          return ( | 
|  | 83 | +            '<pre class="hljs"><code style="border-radius: 0px">' + | 
|  | 84 | +            md.utils.escapeHtml(str) + | 
|  | 85 | +            '</code></pre>' | 
|  | 86 | +          ) | 
| 94 | 87 |         } | 
| 95 | 88 | 
 | 
| 96 |  | -        window.onload = init | 
|  | 89 | +        window.md | 
|  | 90 | +          .use(texmath, { | 
|  | 91 | +            engine: katex, | 
|  | 92 | +            delimiters: 'dollars', | 
|  | 93 | +            katexOptions: { | 
|  | 94 | +              macros: { | 
|  | 95 | +                '\\RR': '\\mathbb{R}', | 
|  | 96 | +              }, | 
|  | 97 | +            }, | 
|  | 98 | +          }) | 
|  | 99 | +          .use(window.markdownItTextualUml) | 
|  | 100 | +      } | 
|  | 101 | + | 
|  | 102 | +      function render(content) { | 
|  | 103 | +        if (window.md) { | 
|  | 104 | +          document.body.innerHTML = md.render(content) | 
|  | 105 | + | 
|  | 106 | +          setTimeout(() => { | 
|  | 107 | +            console.warn('loading mermaid') | 
|  | 108 | +            mermaid.initialize({ | 
|  | 109 | +              startOnLoad: true, | 
|  | 110 | +            }) | 
|  | 111 | +          }, 1000) | 
|  | 112 | +        } else { | 
|  | 113 | +          setTimeout(() => { | 
|  | 114 | +            render(content) | 
|  | 115 | +          }, 100) | 
|  | 116 | +        } | 
|  | 117 | +      } | 
| 97 | 118 | 
 | 
| 98 |  | -        Edrys.onReady(() => { | 
| 99 |  | -            console.log("Markdown-IT loaded") | 
|  | 119 | +      window.onload = init | 
| 100 | 120 | 
 | 
| 101 |  | -            init() | 
|  | 121 | +      Edrys.onReady(() => { | 
|  | 122 | +        console.log('Markdown-IT loaded') | 
| 102 | 123 | 
 | 
| 103 |  | -            let content = Edrys.module.config || "" | 
|  | 124 | +        init() | 
| 104 | 125 | 
 | 
| 105 |  | -            content += "\n\n" + (Edrys.module[Edrys.role.toLowerCase() + 'Config'] || "") | 
|  | 126 | +        let content = Edrys.module.config || '' | 
| 106 | 127 | 
 | 
| 107 |  | -            render(content) | 
| 108 |  | -        }); | 
|  | 128 | +        content += | 
|  | 129 | +          '\n\n' + (Edrys.module[Edrys.role.toLowerCase() + 'Config'] || '') | 
|  | 130 | + | 
|  | 131 | +        render(content) | 
|  | 132 | +      }) | 
| 109 | 133 |     </script> | 
| 110 | 134 | 
 | 
| 111 | 135 |     <title>Markdown-IT</title> | 
| 112 |  | -</head> | 
| 113 |  | - | 
| 114 |  | -<body> | 
| 115 |  | -     | 
| 116 |  | -</body> | 
|  | 136 | +  </head> | 
| 117 | 137 | 
 | 
|  | 138 | +  <body></body> | 
| 118 | 139 | </html> | 
0 commit comments