Closed danielepolencic closed 2 years ago
test with 7.2.0 and 6.0.2
No response
import { raw } from "hast-util-raw" const root = raw({ type: 'root', children: [ { type: 'element', tagName: 'span', children: [ { type: 'raw', value: '/api/v1/<resource-type-name>/<resource-name>', <-- this }, ], }, ], }) console.log(root) // { // "type": "root", // "children": [ // { // "type": "element", // "tagName": "span", // "properties": {}, // "children": [ // { // "type": "text", // "value": "/api/v1/<resource-type-name>/<resource-name" <-- this // } // ] // } // ], // "data": { // "quirksMode": false // } // }
The last > is retained.
>
The last > is removed.
Node v14
npm v7
macOS
Other (please specify in steps to reproduce)
Thanks for the repro, that helped. Complex to track down but it’s solved!
Initial checklist
Affected packages and versions
test with 7.2.0 and 6.0.2
Link to runnable example
No response
Steps to reproduce
Expected behavior
The last
>
is retained.Actual behavior
The last
>
is removed.Runtime
Node v14
Package manager
npm v7
OS
macOS
Build and bundle tools
Other (please specify in steps to reproduce)