Closed
Description
Initial checklist
- I read the support docs
- I read the contributing guide
- I agree to follow the code of conduct
- I searched issues and couldn’t find anything (or linked relevant results below)
Affected packages and versions
test with 7.2.0 and 6.0.2
Link to runnable example
No response
Steps to reproduce
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
// }
// }
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)