UNPKG

@awesome-fe/translate

Version:
22 lines 882 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BlockResourceRenderer = void 0; const block_node_renderer_1 = require("./block-node-renderer"); class BlockResourceRenderer extends block_node_renderer_1.BlockNodeRenderer { type; constructor(type, internalAttributes) { super(); this.type = type; this.positionalAttributes = internalAttributes.filter((it => it.position)); this.inlineAttributeNames = internalAttributes.map(it => it.name); } getBlockTitle(node) { return node.getTitle(); } renderBody(node) { const attributes = this.renderAttributes(this.getInlineAttributes(node)); return `${this.type}::${node.getAttribute('target')}[${attributes}]`; } } exports.BlockResourceRenderer = BlockResourceRenderer; //# sourceMappingURL=block-resource-renderer.js.map