Dictionary: Serialize empty dict as {} instead of {\n}

Also make sure to always convert multiline dictionaries to a single line for
its EditorHelp representation, as multiline values break formatting.
This commit is contained in:
Rémi Verschelde
2022-01-18 11:31:15 +01:00
parent 045648d091
commit 8898d6dadc
12 changed files with 25 additions and 33 deletions

View File

@ -24,8 +24,7 @@
<argument index="0" name="text" type="String" />
<argument index="1" name="fonts" type="Font" />
<argument index="2" name="size" type="int" />
<argument index="3" name="opentype_features" type="Dictionary" default="{
}" />
<argument index="3" name="opentype_features" type="Dictionary" default="{}" />
<argument index="4" name="language" type="String" default="&quot;&quot;" />
<description>
Adds text span and font to draw it.
@ -259,8 +258,7 @@
<argument index="1" name="fonts" type="Font" />
<argument index="2" name="size" type="int" />
<argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" />
<argument index="4" name="opentype_features" type="Dictionary" default="{
}" />
<argument index="4" name="opentype_features" type="Dictionary" default="{}" />
<argument index="5" name="language" type="String" default="&quot;&quot;" />
<description>
Sets drop cap, overrides previously set drop cap. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.