use hbox instead of richtextlabel for nested text tags, complete invite creation

This commit is contained in:
Face
2025-08-23 14:45:45 +03:00
parent 00b78f86fb
commit e19d4b7f61
12 changed files with 205 additions and 134 deletions

View File

@@ -436,7 +436,9 @@ static func apply_element_bbcode_formatting(element: HTMLElement, styles: Dictio
color = "#" + color.to_html(false)
else:
color = str(color)
formatted_content = "[color=%s]%s[/color]" % [color, formatted_content]
var color_pattern = "[color=%s]" % color
if not formatted_content.contains(color_pattern):
formatted_content = "[color=%s]%s[/color]" % [color, formatted_content]
# Apply tag-specific formatting
match element.tag_name:
@@ -471,8 +473,8 @@ static func apply_element_bbcode_formatting(element: HTMLElement, styles: Dictio
var href = element.get_attribute("href")
if href.length() > 0:
# Pass raw href - URL resolution happens in handle_link_click
formatted_content = "[url=%s]%s[/url]" % [href, formatted_content]
if not formatted_content.contains("[url="):
formatted_content = "[url=%s]%s[/url]" % [href, formatted_content]
return formatted_content