-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
| [![PR App][icn]][demo] | Ref RM-12072 | | :--------------------: | :----------: | ## 🧰 Changes Fixes a crash when rendering exported components. The error was caused because we were passing in an map of custom block tags (not exports) to `tocToMdx`. The `tocToMdx` function would parse the toc for tags, and see if they had an associated `toc` export. By for exported components, that (`component[node.name]`) would be `undefined`, and we would crash. This refactors it to be slightly clearer and less error prone. ## ✅ TODO **How do we handle generating a Table of Contents for Custom Components??** We currently support parsing a table of contents from the default export, because that's how reusable content works. This is probably not the best way to do it with regards to custom components. The default, or any of the exports, could be JSX or markdown or any kinda of ESM object. ## 🧬 QA & Testing - [Broken on production][prod]. - [Working in this PR app][demo]. [demo]: https://markdown-pr-PR_NUMBER.herokuapp.com [prod]: https://SUBDOMAIN.readme.io [icn]: https://user-images.githubusercontent.com/886627/160426047-1bee9488-305a-4145-bb2b-09d8b757d38a.svg
- Loading branch information
1 parent
9a8743e
commit 2824e1f
Showing
8 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
Binary file added
BIN
+8.2 KB
...l-regression-tests-rdmd-syntax-renders-child-tests-without-surprises-1-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<Steps> | ||
<Step>Step One</Step> | ||
<Step>Step Two</Step> | ||
</Steps> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters