import { parserMarkdownToSlateNode } from "./parserMarkdownToSlateNode";
var transformResult = function transformResult(result) {
    var _result_schema;
    return {
        schema: (_result_schema = result.schema) === null || _result_schema === void 0 ? void 0 : _result_schema.filter(function(s) {
            if (s.language === 'html' && (s === null || s === void 0 ? void 0 : s.isConfig)) {
                return false;
            }
            if (!s.type && !(s === null || s === void 0 ? void 0 : s.text)) {
                return false;
            }
            return true;
        }),
        links: result.links || []
    };
};
export var parserMdToSchema = function parserMdToSchema(code, plugins) {
    return transformResult(parserMarkdownToSlateNode(code, plugins));
};
