godotengine / godotengine/godot
BBCode is inconsistent when used in inspector tooltips with @export variables.
- 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.

### 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
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