I would like to show a matrix (mathematical entity) in rust doc comments. I tried using this:
/**
For example, given the projection matrix:
1 0 0 0
1 0 0 0
1 0 0 0
1 0 0 0
*/
While it looks acceptable in the code, the generated comments seem to remove the extra spaces between each matrix element. It looks something like this:
What would be the best way to format this matrix correctly? Or is this the best I'm going to get?
My IDE is VS Code, with extension rust-analyser installed only.
UPDATE:
It does not seem to be an IDE issue, as the generated docs using cargo doc --open
shows similarly un-formatted matrix: