-
Notifications
You must be signed in to change notification settings - Fork 18
fix: support structured user variables #1488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
Changes from 4 commits
fe28923
71928d7
547b447
0fdeb33
80e0996
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
RAYMOND-LUO marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -277,7 +277,7 @@ interface TocList extends Element { | |
|
|
||
| interface Variables { | ||
| defaults: { default: string; name: string }[]; | ||
| user: Record<string, string>; | ||
| user: Record<string, unknown>; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change makes sense but just be careful since this type gets used in several places including the main readme repo 🙏 Hopefully it doesn't break
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yea good point - funny enough it looks like the readme repo imports Variables from At least to my understanding, the only direct consumer that needed updating is mdx-renderer (handled in my other pr) |
||
| } | ||
|
|
||
| interface TocListItem extends Element { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mdxish resolves {user.*} as whole variable nodes rather than arbitrary JS expressions, so these cases assert the stringified value instead of drilling into nested properties like mdx.