Skip to content

Aufruf von Clerk.markdown() hinterlässt stets gleiches <script> im DOM #65

@denkspuren

Description

@denkspuren

Da die Methode Clerk.markdown statisch ist, bleibt ihr Aufrufverhalten stets gleich, so dass jedesmal ein <script>-Tag mit dem folgenden Inhalt im Browser hinterlassen wird. Das ist freilich redundant. Es wäre schön, wenn sich dafür eine einfache Lösung fände.

var md = markdownit({
    highlight: function (str, lang) {
        if (lang && hljs.getLanguage(lang)) {
            try {
                return hljs.highlight(str, { language: lang }).value;
            } catch (__) {}
        }
        return ''; // use external default escaping
    },
    html: true,
    linkify: true,
    typographer: true
});
md.use(window.mathjax3);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions