machow / quartodoc

Generate API documentation with quarto
https://machow.github.io/quartodoc
MIT License
181 stars 21 forks source link

Typehint formatting issues with `None` #277

Open gforsyth opened 1 year ago

gforsyth commented 1 year ago

Hey @machow !

In looking over the Ibis docs, I noticed an inconsistency in the way the Type column of a docstring gets formatted -- https://ibis-project.org/reference/expression-tables.html#ibis.expr.types.relations.Table.aggregate is a good representative example.

When None is in the Type column, it doesn't get formatted as monospace -- you can see under by that it renders as "Sequence[ir.Value] | None", while in the Default column, it's properly monospaced.

Thanks for quartodoc, it's great!

machow commented 1 year ago

Thanks for flagging -- it looks like the py-shiny team just wraps the whole thing e.g. Sequence[ir.Value] | None in a code element (discussed here: https://github.com/machow/quartodoc/issues/208). Lemme try wrapping everything in <code> and see if that resolves the issue..