-
Notifications
You must be signed in to change notification settings - Fork 341
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
HTML in Preformatted code is rendered in docs page #496
Labels
Comments
Omd should probably escape the special characters when transforming the document to HTML. cc @tatchi |
Direct link to faulty rendering: https://ocaml.org/docs/functional-programming#aliases-for-function-names-and-arguments |
Hilite is the faulty component. Removing highlighting removes colors and faulty behaviour diff --git a/tool/ood-gen/lib/tutorial.ml b/tool/ood-gen/lib/tutorial.ml
index a1a4a77..fe43a66 100644
--- a/tool/ood-gen/lib/tutorial.ml
+++ b/tool/ood-gen/lib/tutorial.ml
@@ -81,7 +81,7 @@ let all () =
category = metadata.category;
toc_html = Omd.to_html (Omd.toc ~depth:4 toc_doc);
body_md = body;
- body_html = Omd.to_html (Hilite.Md.transform omd);
+ body_html = Omd.to_html omd;
})
"tutorials/*.md" |
PR in Hilite: patricoferris/hilite#5 |
This was referenced Nov 24, 2022
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Even though
<!-- $MDX skip -->
exists on top of the pre-formatted text in documentation, the HTML is being rendered in the output.For example:
https://github.com/ocaml/ocaml.org/blob/main/data/tutorials/lg_01_functional_programming.md?plain=1#L440-L453
This is how the markdown should look like (Github's readme screenshot):
This is what it looks like now (ocaml.org/docs screenshot):
The text was updated successfully, but these errors were encountered: