Godot: Editor docs are broken

Created on 1 Nov 2017  路  18Comments  路  Source: godotengine/godot

Operating system or device, Godot version, GPU Model and driver (if graphics related):
latest master

Issue description:
Looks like GDScript doc is broken inside the editor
image

bug editor

Most helpful comment

I think this is a new "condensed documentation" feature 馃槅

All 18 comments

Could be a regression from #12025 merged today, cc @leezh

Looks like a Node has this problem too..

under get_node description -

image

this used to happen after a multi line code block.

I think this is a new "condensed documentation" feature 馃槅

Crap, I didn't test it on multiline code blocks. :/ Sorry for the breakages.

Undid my commit and confirmed it was my change that did it. Still finding out the root cause, because changing white-space shouldn't do that.

Okay, so this is very weird:
1
2

EDIT: This works even after reverting my changes.

EDIT 2: This also happens in 2.1

Somehow printing newline on its own messing things up. (And I guess because dedent removes the trailing tabs but preserves newlines it shows up there)

So I think while #12025 isn't the cause of the bug, it does very clearly expose it. For now we should replace
https://github.com/godotengine/godot/blob/025f13856138918b13956b085a586a73a584bc04/editor/doc/doc_data.cpp#L620

with a simple return string.strip_edges(); until we fix this problem.

@leezh the problem are indeed the double newlines, thats the reason why i removed them, causing the text on block to look a bit indented, but it solved the problem with multiline blocks, i could not figure out what the problem was with them (and also it does not make sense to do such replacement anyway)

I'm currently digging into the problem. At the moment I can reliably re-create it with any RichTextLabel using RichTextLabel.newline(). This isn't a bug isolated to the editor, and it isn't related to the dedent function I added.

And I disagree that padding out newlines with white-space is the solution to this, nor is getting rid of double-newlines in the docs.

RichTextLabel isn't behaving as it should and therefore should be fixed there.

Hopefully once I've fixed this we can back-port it to 2.1 because it seems to be affected there as well.

@leezh getting rid of double newlines is how it has to behave, if you want to have a double space, then you use double space, there is no point in converting to double newline, thats not how it is supposed to work simple as that, maybe there is a bug, but double newlines are wrong.

There. Fixed it the proper way rather than sweeping the problem under the rug.

@leezh still, docs do not need double newlines inserted.

Is what you're suggesting removing .replace("\n", "\n\n") and adding paragraph spacing to the XML docs themselves as appropriate? Because I understand that now.

@leezh yeah, thats how it works in the web version and how it makes more sense (specially for code blocks).

Okay. Sounds good. Once #12575 merges, would you like me to do it?

Edit: Actually, since it might result in a ton of merge conflicts, would it be better if @akien-mga or someone coordinating the merge window do it?

Oh, also @djrm sorry if I seemed a bit harsh against you.

I was quite upset that people's response to "double-newlines in RichText broke docs" was to work around it (in a silly manner which now needs cleaning up) rather than find and fix the cause of it. It's fine if you need to ship a game within a deadline, but you don't do that in a library.

Anyways, I realised that it was wrong of me to redirect that anger towards you.

@leezh nah, no problem

Was this page helpful?
0 / 5 - 0 ratings