"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AnchorView = void 0;
const context_1 = require("../context");
const constants_1 = require("../../constants");
const AnchorView = (props) => {
    const { plugins } = (0, context_1.usePeritext)();
    // This zero-width non-breaking space prevents word wrapping at position where
    // anchor is inserted.
    let children = constants_1.Char.ZeroLengthSpace;
    for (const plugin of plugins)
        children = plugin.anchor?.(props, children) ?? children;
    return children;
};
exports.AnchorView = AnchorView;
//# sourceMappingURL=AnchorView.js.map