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
I'm working on a particular set of docs which were last built with Sphinx 3.5, and it did not output parentheses after parameter types. Was this change made intentionally? (I'm not sure why it would ever make sense to have parentheses after parameter type names.) Is there a way to revert to the old behaviour?
Thanks!
The text was updated successfully, but these errors were encountered:
AA-Turner
changed the title
Why do parameter types in the JavaScript domain have parentheses appended?
Parameter types in the JavaScript domain have erroneous brackets
Jan 7, 2025
I think it's because we specify 'class': JSXRefRole(fix_parens=True) instead of fix_parens=False (which is what the Python domain does). Since the types are rendered as if they were class references, they get an additional () suffix). I need to check this but I guess that's one reason.
EDIT: ok it's not that. But looking at the HTML we have:
The role is func instead of class. But changing it into class leads to lots of not-found references. Could be fine to change it but this could annoy existing builds, so we could first suppress the reference errors arising from those places (it surprises me though that the func role didn't actually lead to ref errors as well).
Reported in https://github.com/orgs/sphinx-doc/discussions/13216 by @resnickj
Originally posted by resnickj January 7, 2025
This can be seen right on the Sphinx documentation page for the JavaScript domain: https://www.sphinx-doc.org/en/master/usage/domains/javascript.html
I'm working on a particular set of docs which were last built with Sphinx 3.5, and it did not output parentheses after parameter types. Was this change made intentionally? (I'm not sure why it would ever make sense to have parentheses after parameter type names.) Is there a way to revert to the old behaviour?
Thanks!
The text was updated successfully, but these errors were encountered: