Add support for long roll command

This commit is contained in:
Michal Kunc
2021-11-18 23:33:46 +01:00
parent 9641173758
commit 3982850dd3
+1 -1
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\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')