godotengine / godotengine/godot

BBCode is inconsistent when used in inspector tooltips with @export variables.

Open
#94,336 3 comments 0 reactions 0 assignees View on GitHub
discussion documentation topic:editor topic:gui
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

v4.3.beta2.official [b75f0485b]

### System information

Linux Kubuntu 23.04 KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.104.0 Qt Version: 5.15.8

### Issue description

Adding tooltips to @export variables does not support many bbcodes.

![image](https://github.com/user-attachments/assets/5a5b7335-9f4b-4147-a8e9-c92ae8981726)

### Steps to reproduce

Create an empty 2D scene. E.g. `Control`
Add an external script to it. E.g. `control.gd
`
Add the following to script and save:
```gdscript
extends Control

## [p]Hello[/p]Notice no paragraph.
## [bgcolor=RED]Should be background red.[/bgcolor][br][i][color=green]THIS IS ITALIC AND GREEN.[/color][/i]
## [br]Click for more info url works [url=https://yahoo.com]https://yahoo.com[/url]
## [p][right]This is a paragraph but did not break[/right]
## [br][font_size=30]Should be 10[/font] font
## [br]Strangely enough the [ br ] acts as [br] paragraph, although not documented.
@export var maximum_speed:int=100
```

Now hover over the exported variable `maximum_speed`, in the inspector. You will see that only some of the bbcodes work. For example` [p], [bgcolor], [right] `are ignored and shown as text. As a matter of fact I have discovered an undocumented `[br] `break in lieu of `[p] `paragraph code.

### Minimal reproduction project (MRP)

Test project [Archive.zip](https://github.com/user-attachments/files/16214893/Archive.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the attached MRP and control.gd, then reproduce the issue by hovering over maximum_speed in the inspector. Compare the reported BBCode tags, including [p], [bgcolor], [right], and [br], and trace the inspector tooltip entry point. Done means the intended tags render consistently and the undocumented behavior is resolved or clearly defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.