-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using [url=...]
breaks get_character_paragraph
and get_character_line
#66736
Comments
A comment in
This appears to be exactly what I don't understand whether this would have other consequences but I'm going to try and code it and see what happens. |
Maybe I need to teach |
This is how it is supposed to work. |
I guess getting line/paragraph for the position in the BBCode source is useful to have, so we should add an option to do so (an extra argument for the |
Thanks, @bruvzg! Is how it's supposed to work documented anywhere? My use case is that I want to scroll to the position of a string in the text. I only know the offset into the text I submitted to the control (which likely has BBCode in it) and I don't see that I have access to the offsets into the rendered text. I'm not sure how The |
Calculating the required address in GDScript was a lot easier than changing the engine for me obviously but if there's any desire for this feature I'd be interested in working on it. |
Godot version
4.0.beta2
System information
Linux
Issue description
RichTextLabel
fails to account for the characters taken up by the URL (I think) when[url=...]
tags are used. This causesget_character_paragraph
andget_character_line
to return incorrect values when several long URLs are used.Steps to reproduce
Please see https://github.com/nerdbeard/RichTextLabel-offset/blob/main/anchor.gd for a minimal example.
Minimal reproduction project
https://github.com/nerdbeard/RichTextLabel-offset
The text was updated successfully, but these errors were encountered: