Merge pull request #3729 from ChrisLR/patch-2

[Godot Contrib] Fix text2bbcode mxp links
This commit is contained in:
Griatch 2025-02-15 11:20:27 +01:00 committed by GitHub
commit 9b13d73eac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -58,7 +58,7 @@ class TestText2Bbcode(TestCase):
mocked_match = mock.Mock()
mocked_match.groups.return_value = ["cmd", "text"]
self.assertEqual("[mxp=send cmd=cmd]text[/mxp]", parser.sub_mxp_links(mocked_match))
self.assertEqual("[url=send cmd=cmd]text[/url]", parser.sub_mxp_links(mocked_match))
def test_sub_text(self):
parser = text2bbcode.BBCODE_PARSER

View file

@ -705,7 +705,7 @@ class TextToBBCODEparser(TextToHTMLparser):
"""
cmd, text = [grp.replace('"', "\\"") for grp in match.groups()]
val = f"[mxp=send cmd={cmd}]{text}[/mxp]"
val = f"[url=send cmd={cmd}]{text}[/url]"
return val