-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
🐛 type/bugThis is a problemThis is a problem👶 semver/patchThis is a backwards-compatible fixThis is a backwards-compatible fix💪 phase/solvedPost is donePost is done🗄 area/interfaceThis affects the public interfaceThis affects the public interface
Description
Subject of the issue
Parse error. Something to do with the way children are wrapped inside of JSX I think because the issue only appears with content above the child and also a hanging >
Your environment
- Packages:
@mdx-js/mdx@2.0.0-next.8
Steps to reproduce
<Box>
Original:
<Box
as="a"
href="https://stackoverflow.com/questions/28732670/getting-recently-updated-packages/29104122#29104122"
>
s
</Box>
</Box>
repro script for the above file:
const mdx = require("@mdx-js/mdx");
const fs = require("fs").promises;
async function process() {
try {
const file = await fs.readFile("./thing.mdx", "utf-8");
const result = await mdx(file);
console.log(result);
} catch (e) {
console.log(e);
}
}
process();
Expected behaviour
dunno, seems weird that this breaks on parsing.
Actual behaviour
[5:108: Unexpected end of file before attribute name, expected a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag] {
reason: 'Unexpected end of file before attribute name, expected a character that can start an attribute name, such as a letter, `$`, or `_`; whitespace before attributes; or the end of the tag',
line: 5,
column: 108,
location: {
start: { line: 5, column: 108, offset: 143, index: 123 },
end: { line: null, column: null }
},
source: 'remark-mdx',
ruleId: 'unexpected-eof',
fatal: true
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🐛 type/bugThis is a problemThis is a problem👶 semver/patchThis is a backwards-compatible fixThis is a backwards-compatible fix💪 phase/solvedPost is donePost is done🗄 area/interfaceThis affects the public interfaceThis affects the public interface