Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Seeing em.scribe-marker tags during "normalize" #460

Open
mindplay-dk opened this issue Mar 15, 2016 · 0 comments
Open

Seeing em.scribe-marker tags during "normalize" #460

mindplay-dk opened this issue Mar 15, 2016 · 0 comments

Comments

@mindplay-dk
Copy link

I have a simple plugin along the lines of:

define(function () {

    return function() {

        /**
         * @param {Node} node
         */
        function sanitize(node) {
            // ...
        }

        return function (scribe) {
            scribe.registerHTMLFormatter('normalize', function (html) {
                if (typeof html === 'string') {
                    var node = document.createElement('div');

                    node.innerHTML = html;

                    sanitize(node);

                    return node.innerHTML;
                } else {
                    sanitize(html);

                    return html
                }
            });
        };
    };

});

While visiting every node recursively, I seem to encounter the <em class="scribe-marker"> tags.

Should that be happening?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant