We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f41ef32 commit 02e68a3Copy full SHA for 02e68a3
errbot/backends/slack.py
@@ -61,7 +61,7 @@
61
'cyan': '#00FFFF'
62
} # Slack doesn't know its colors
63
64
-MARKDOWN_LINK_REGEX = re.compile(r'([^!])\[(?P<text>.+?)\]\((?P<uri>[a-zA-Z0-9]+?:\S+?)\)')
+MARKDOWN_LINK_REGEX = re.compile(r'(?<!!)\[(?P<text>.+?)\]\((?P<uri>[a-zA-Z0-9]+?:\S+?)\)')
65
66
67
def slack_markdown_converter(compact_output=False):
@@ -82,7 +82,7 @@ class LinkPreProcessor(Preprocessor):
82
"""
83
def run(self, lines):
84
for i, line in enumerate(lines):
85
- lines[i] = MARKDOWN_LINK_REGEX.sub(r'\1<\3|\2>', line)
+ lines[i] = MARKDOWN_LINK_REGEX.sub(r'<\2|\1>', line)
86
return lines
87
88
0 commit comments