bitran
Version:
📜 Highly customizable text processor and transpiler.
29 lines (28 loc) • 824 B
JavaScript
import { defineComponent, h, Text, Fragment, openBlock, createBlock, unref } from "vue";
import { u as useParseData, b as usePrettyText } from "./index-C7zkcRZi.js";
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "Text",
props: {
node: {}
},
setup(__props) {
const text = useParseData(__props.node);
const pretty = usePrettyText();
const SubNodes = [];
for (const textFragment of text.split(/\\$/gm)) {
if (!textFragment)
continue;
SubNodes.push(h(Text, pretty(textFragment)));
SubNodes.push(h("br"));
}
SubNodes.pop();
const TextContent = h(Fragment, SubNodes);
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(TextContent));
};
}
});
export {
_sfc_main as default
};
//# sourceMappingURL=Text-DRT-CO04.js.map