Skip to content

Commit 66cbbec

Browse files
authored
Merge pull request #4 from yordis/fix-node-lookup
fix: node type lookup
2 parents eb7ee1d + e16b693 commit 66cbbec

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*@jsxRuntime automatic @jsxImportSource react*/
2+
export const title = "Hello TOML";
3+
function MDXContent(props = {}) {
4+
const _components = Object.assign({
5+
h1: "h1",
6+
p: "p"
7+
}, props.components), {wrapper: MDXLayout} = _components;
8+
const _content = <><_components.h1>{"Hello, World"}</_components.h1>{"\n"}<_components.p>{"Some content"}</_components.p></>;
9+
return MDXLayout ? <MDXLayout {...props}>{_content}</MDXLayout> : _content;
10+
}
11+
export default MDXContent;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
+++
2+
title = "Hello TOML"
3+
+++
4+
5+
# Hello, World
6+
7+
Some content
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const remarkMdxFrontmatter: Attacher<[RemarkMdxFrontmatterOptions?]> =
4444
data = parse(value);
4545
}
4646
if (data == null) {
47-
return;
47+
continue;
4848
}
4949
if (!name && typeof data !== 'object') {
5050
throw new Error(`Expected frontmatter data to be an object, got:\n${value}`);

0 commit comments

Comments
 (0)