godotengine / godot-docs

Godot Engine official documentation
https://docs.godotengine.org
Other
3.6k stars 2.97k forks source link

Remove spaces after and before opening, and before closing parenthesis #5074

Open MaaaxiKing opened 3 years ago

MaaaxiKing commented 3 years ago

Your Godot version: 3.3.2.stable.mono Issue description: The parentheses are gratuitous. For example, write _enter_tree() instead of _enter_tree ( ). URL to the documentation page (if already existing): E.g., https://docs.godotengine.org/en/stable/classes/class_node.html#:~:text=Methods

Calinou commented 3 years ago

Unfortunately, as far as I know, we can't remove those spaces without breaking formatting. This is a reStructuredText limitation.

We might be able to hack around this with zero-width spaces though (which are technically considered spaces, but don't occupy any visible space).

MaaaxiKing commented 3 years ago

Isn't it possible to edit it manually, even without zero-width spaces? I'd feel honored if I could help with that.

Calinou commented 3 years ago

Isn't it possible to edit it manually, even without zero-width spaces? I'd feel honored if I could help with that.

The class reference in this repository is generated automatically using this script. It should not be edited manually.

MaaaxiKing commented 3 years ago

Okay, then it's the only good solution to replace the normal spaces. But then use narrow no-break space (HTML  ).

Calinou commented 3 years ago

Unfortunately, neither \u200b nor \u200c nor \u2060 work to add an invisible space that preserves formatting:

image

Not even a narrow non-breaking space works.

MaaaxiKing commented 2 years ago

Although it doesn't work, I want to make clear that narrow no-break space would be bad anyway, I forgot that it does have a width. The reason why I suggested another one than zero-width space is that I wasn't sure if a line break is possible. It is. So a zero width no-break space (HTML ) or a word joiner (HTML ⁠) would be better.