mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 05:27:17 +02:00
Fixed an error in the MXP implementation and also removed the deprecated {-form for MXP. Resolves #966.
This commit is contained in:
parent
01c6cbf5f0
commit
8f12dd83a3
2 changed files with 2 additions and 5 deletions
|
|
@ -16,8 +16,7 @@ http://www.gammon.com.au/mushclient/addingservermxp.htm
|
|||
from builtins import object
|
||||
import re
|
||||
|
||||
LINKS_SUB = re.compile(r'\{lc(.*?)\{lt(.*?)\{le', re.DOTALL)
|
||||
LINKS_SUB2 = re.compile(r'\|lc(.*?)\|lt(.*?)\|le', re.DOTALL)
|
||||
LINKS_SUB = re.compile(r'\|lc(.*?)\|lt(.*?)\|le', re.DOTALL)
|
||||
|
||||
MXP = "\x5B"
|
||||
MXP_TEMPSECURE = "\x1B[4z"
|
||||
|
|
@ -43,7 +42,6 @@ def mxp_parse(text):
|
|||
.replace(">", ">")
|
||||
|
||||
text = LINKS_SUB.sub(MXP_SEND, text)
|
||||
text = LINKS_SUB2.sub(MXP_SEND, text)
|
||||
return text
|
||||
|
||||
class Mxp(object):
|
||||
|
|
|
|||
|
|
@ -434,8 +434,7 @@ class ANSIParser(object):
|
|||
(r'\|\[[0-5]{3}', ""), # |[123 - background colour
|
||||
]
|
||||
|
||||
mxp_re = r'\{lc(.*?)\{lt(.*?)\{le|' \
|
||||
r'\|lc(.*?)\|lt(.*?)\|le'
|
||||
mxp_re = r'\|lc(.*?)\|lt(.*?)\|le'
|
||||
|
||||
# prepare regex matching
|
||||
brightbg_sub = re.compile(r"|".join([re.escape(tup[0]) for tup in ansi_bright_bgs]), re.DOTALL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue