Merge pull request #3729 from ChrisLR/patch-2
[Godot Contrib] Fix text2bbcode mxp links
This commit is contained in:
commit
9b13d73eac
2 changed files with 2 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ class TestText2Bbcode(TestCase):
|
||||||
mocked_match = mock.Mock()
|
mocked_match = mock.Mock()
|
||||||
mocked_match.groups.return_value = ["cmd", "text"]
|
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):
|
def test_sub_text(self):
|
||||||
parser = text2bbcode.BBCODE_PARSER
|
parser = text2bbcode.BBCODE_PARSER
|
||||||
|
|
|
||||||
|
|
@ -705,7 +705,7 @@ class TextToBBCODEparser(TextToHTMLparser):
|
||||||
|
|
||||||
"""
|
"""
|
||||||
cmd, text = [grp.replace('"', "\\"") for grp in match.groups()]
|
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
|
return val
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue