-
Notifications
You must be signed in to change notification settings - Fork 334
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
Rendering issues for generated API docs #1168
Comments
This is an upstream bug in a dependency of the thing we actually use... and blackfriday doesn't seem to be maintained. A fix upstream seems difficult to rely on, so we might have to work around this. Either:
|
Note: In #1170 we add trust-manager API doc generation with |
We run gen-crd-api-reference-docs in "markdown" mode, where it will process doc comments as markdown, but it's buggy and incorrect for some links.
An example is this line which is converted to:
That invalid link ends up getting parsed a second time (when we render the file using next.js) and we end up creating a second
<a>
inside the first<a>
which is even more invalid. That then confuses React which expects only valid HTML, and it prints lots of errors (but renders OK, I think).A possible solution would be to parse all of the docs comments as HTML, but that's not possible because some of them are invalid HTML and in any case a lot of them use Markdown so it'd be tedious to change it for all CRDs on all branches.
I created an example using just blackfriday which illustrates the error:
This produces this output:
On both the version of blackfriday used by gen-crd-api-reference-docs and on the latest version
The text was updated successfully, but these errors were encountered: