You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the HTML-generated documentation the lines prefixed with # won't show up. But if you execute cargo test --doc the entire code snippet will be compiled, including the # prefixed lines.
We need something along those lines for use.ink.
ToDo
docusaurus uses prism.js for rendering code into HTML.
Check if that tool supports hiding lines. I had briefly checked and didn't find anything. Might have overlooked it though.
If it does not, create a PR for it to add this feature.
Follow-ups
This is not part of this ticket, but once we have the hide-lines feature for code we can:
Ask Parity's OpsTooling to create a tool that extracts this code and compiles it.
Integrate this tool into our CI.
Add surrounding code to existing code snippets, so that they compile.
The text was updated successfully, but these errors were encountered:
The Idea
I would love to see code testing of our Rust code examples. This should be analog to how it works for Rust doc tests.
Reminder: In Rust comments, code snippets can be included like this:
In the HTML-generated documentation the lines prefixed with
#
won't show up. But if you executecargo test --doc
the entire code snippet will be compiled, including the#
prefixed lines.We need something along those lines for use.ink.
ToDo
docusaurus uses prism.js for rendering code into HTML.
Follow-ups
This is not part of this ticket, but once we have the hide-lines feature for code we can:
The text was updated successfully, but these errors were encountered: