summaryrefslogtreecommitdiffstats
path: root/web/react/utils/markdown.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2015-09-21 12:13:44 -0400
committerJoram Wilander <jwawilander@gmail.com>2015-09-21 12:13:44 -0400
commit977ab87d4a9d809a2db12bd3d80cd1c4bbd38be4 (patch)
treeb8ea8ad80618aa20bf27f46ca6a9ed6a9730bdde /web/react/utils/markdown.jsx
parenta35fa9c974833c34fe972ee44ba80eb828e7aaf0 (diff)
parenta2e3446e373c51e595fb4e80a04bf80c3ea18027 (diff)
downloadchat-977ab87d4a9d809a2db12bd3d80cd1c4bbd38be4.tar.gz
chat-977ab87d4a9d809a2db12bd3d80cd1c4bbd38be4.tar.bz2
chat-977ab87d4a9d809a2db12bd3d80cd1c4bbd38be4.zip
Merge pull request #736 from hmhealey/plt312
PLT-312 Added theme class to markdown links
Diffstat (limited to 'web/react/utils/markdown.jsx')
-rw-r--r--web/react/utils/markdown.jsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx
index 8c63810cd..96da54217 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -11,6 +11,12 @@ export class MattermostMarkdownRenderer extends marked.Renderer {
outHref = `http://${outHref}`;
}
- return super.link(outHref, title, text);
+ let output = '<a class="theme" href="' + outHref + '"';
+ if (title) {
+ output += ' title="' + title + '"';
+ }
+ output += '>' + text + '</a>';
+
+ return output;
}
}