mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-04-06 15:53:57 -04:00
Handle parsing of unknown/custom elements in parse.ts and bump API package version to 1.32.1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@compass/api",
|
||||
"version": "1.32.0",
|
||||
"version": "1.32.1",
|
||||
"private": true,
|
||||
"description": "Backend API endpoints",
|
||||
"main": "src/serve.ts",
|
||||
|
||||
@@ -261,6 +261,14 @@ function parseBlockElement(
|
||||
return {type: '__fragment', content: inner} as any
|
||||
}
|
||||
|
||||
// Unknown/custom elements — try to parse as container (e.g., <projectcontent>, <bodycopy>)
|
||||
if (el.children.length > 0) {
|
||||
const inner = parseBlockElements(el.children, classStyles)
|
||||
if (inner.length === 0) return null
|
||||
if (inner.length === 1) return inner[0]
|
||||
return {type: '__fragment', content: inner} as any
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user