Fix type: wrong regex char

This commit is contained in:
Michal Kunc 2021-11-18 23:52:05 +01:00
parent ec6a94f18e
commit 91e17be830
Signed by: michal
GPG Key ID: 4CA5FB6559E0BDF8

View File

@ -21,7 +21,7 @@ def filter_vtt(text):
def compendium_return(m):
# TODO: Actually add links
return f"<a>{m.group(2)}</a>"
macro_re = re.compile(r"\[\[\/\S+?r(?:oll)?\s(?:(?P<sdice>[^\{\] ]+)[^\{\]]*|(?:\{(?P<ldice>[^\}]+)\}\[[^\]]+\])?)\]\](?:\{(?P<alt>[^\}]+)\})?")
macro_re = re.compile(r"\[\[\/\S*?r(?:oll)?\s(?:(?P<sdice>[^\{\] ]+)[^\{\]]*|(?:\{(?P<ldice>[^\}]+)\}\[[^\]]+\])?)\]\](?:\{(?P<alt>[^\}]+)\})?")
def macro_return(m):
if m.group('alt') is not None:
return m.group('alt')