@coherent.js/core 1.0.0-rc.3 → 1.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +10 -0
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/types/index.d.ts +0 -151
package/dist/index.cjs
CHANGED
|
@@ -2190,6 +2190,16 @@ var HTMLRenderer = class extends BaseRenderer {
|
|
|
2190
2190
|
const { children, text, key: _key, html: _rawHtml, ...attributes } = element || {};
|
|
2191
2191
|
const attributeString = formatAttributes(attributes);
|
|
2192
2192
|
const openingTag = attributeString ? `<${tagName} ${attributeString}>` : `<${tagName}>`;
|
|
2193
|
+
if (isVoidElement(tagName)) {
|
|
2194
|
+
if (options.enableCache && this.cache && RendererUtils.isCacheable(element, options)) {
|
|
2195
|
+
const cacheKey = RendererUtils.generateCacheKey(tagName, element);
|
|
2196
|
+
if (cacheKey) {
|
|
2197
|
+
this.cache.set(cacheKey, openingTag);
|
|
2198
|
+
}
|
|
2199
|
+
}
|
|
2200
|
+
this.recordPerformance(tagName, startTime, false);
|
|
2201
|
+
return openingTag;
|
|
2202
|
+
}
|
|
2193
2203
|
if (_rawHtml !== void 0) {
|
|
2194
2204
|
const rawContent = typeof _rawHtml === "function" ? String(_rawHtml()) : String(_rawHtml);
|
|
2195
2205
|
const result = `${openingTag}${rawContent}</${tagName}>`;
|