-
Notifications
You must be signed in to change notification settings - Fork 537
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api-markdown-documenter): Add transformation logic for convertin…
…g our `DocumentationDomain` trees to `hast` (#20168) HTML rendering path does not use this yet, due to issues formatting inconsistencies using `hast-util-to-html`. I'll investigate these more in the future. But the core transformation logic works, is tested, and could be used with other hast-compatible libraries. ### Notes for reviewers The bulk of the logic (everything under `default-transformations` is adapted from the code under `html-renderer/default-renderers`. It's virtually the same code, just with a different output format. Unfortunately, the "old" codepath still needs to live until some of the below-mentioned future work can be completed. ### Future work 1. Replace the majority of the HTML render codepath with this new transformation + `hast-util-to-html` (or something equivalent) - just need to figure out a solution to the output formatting issues. 2. Create comparable transformation logic to output `mdast` for Markdown, and update the corresponding renderer to leverage it. * Required the `toHtml` transformation as a prerequisite, as we leverage embedded HTML in our Markdown output in certain cases.
- Loading branch information
Showing
53 changed files
with
1,871 additions
and
50 deletions.
There are no files selected for viewing
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
Oops, something went wrong.