@uniweb/semantic-parser 1.1.19 → 1.1.20
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/package.json +1 -1
- package/src/processors/sequence.js +14 -0
package/package.json
CHANGED
|
@@ -154,6 +154,20 @@ function createSequenceElement(node, options = {}) {
|
|
|
154
154
|
attrs,
|
|
155
155
|
};
|
|
156
156
|
|
|
157
|
+
case "inset_block": {
|
|
158
|
+
// The block form of an inset: a component reference that carries
|
|
159
|
+
// real block content. Its children are processed like a
|
|
160
|
+
// blockquote's — the default branch would flatten them to a text
|
|
161
|
+
// string, which loses the author's prose entirely.
|
|
162
|
+
const { component, ...params } = attrs || {};
|
|
163
|
+
return {
|
|
164
|
+
type: "inset_block",
|
|
165
|
+
component,
|
|
166
|
+
params,
|
|
167
|
+
children: processSequence({ content }),
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
|
|
157
171
|
case "dataBlock":
|
|
158
172
|
// Pre-parsed structured data from content-reader
|
|
159
173
|
return {
|