Skip to content

Commit 28ebc5a

Browse files
committed
Document whitespace handling in BBCode in RichTextLabel
1 parent 9939c90 commit 28ebc5a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tutorials/ui/bbcode_in_richtextlabel.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ multiple options (separated by spaces within the opening tag). The closing tag
5555
delimits the end of the formatted part. In some cases, both the closing tag and
5656
the content can be omitted.
5757

58+
Unlike BBCode in HTML, leading/trailing whitespace is not removed by a
59+
RichTextLabel upon display. Duplicate spaces are also displayed as-is in the
60+
final output. This means that when displaying a code block in a RichTextLabel,
61+
you don't need to use a preformatted text tag.
62+
5863
.. code-block:: none
5964
6065
[tag]content[/tag]
@@ -618,7 +623,6 @@ the built-in :ref:`class_Color` class. Named classes can be specified in a numbe
618623
styles using different casings: ``DARK_RED``, ``DarkRed``, and ``darkred`` will give
619624
the same exact result.
620625

621-
622626
.. _doc_bbcode_in_richtextlabel_hex_colors:
623627

624628
Hexadecimal color codes
@@ -633,7 +637,6 @@ e.g. ``[color=#ffffff88]translucent white[/color]``. Note that the alpha channel
633637
is the **last** component of the color code, not the first one. Short RGBA
634638
color codes such as ``#6f28`` (equivalent to ``#66ff2288``) are supported as well.
635639

636-
637640
.. _doc_bbcode_in_richtextlabel_cell_options:
638641

639642
Cell options

0 commit comments

Comments
 (0)