godot-rust / gdext

Rust bindings for Godot 4

Home Page:https://mastodon.gamedev.place/@GodotRust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid syntax in docs xml

andreymal opened this issue · comments

I literally copied godot/tests/docs.rs into a new project and got this:

Same happens with code blocks like these:

/// some html snippets inside docstring:
///
/// `foo <em>bar</em>`
///
/// ```html
/// foo <u>bar</u>
/// ```

Replacing < with &amp;lt; (double escaping because markdown unescapes one) fixes everything.

So I suspect that doc strings must be escaped somewhere?

Thanks for pointing these out! Doc registration is a very recent feature (#748), so some parts are not yet ironed out.

Would you be interested in submitting a pull request to address some of the points you mentioned? Someone else recently made a similar PR #815, which could serve as inspiration. We can of course gladly assist and guide you in case of questions! 🙂