Merge pull request #1345 from hmhealey/plt983

PLT-983 Fix _emphasizing_ markdown text when it's not the start of the post
Этот коммит содержится в:
Harrison Healey
2015-11-06 13:16:28 -05:00
родитель e5b9fb6b95 0239239d29
Коммит 32069345b5

Просмотреть файл

@@ -24,7 +24,7 @@ class MattermostInlineLexer extends marked.InlineLexer {
// modified version of the regex that doesn't break up words in snake_case,
// allows for links starting with www, and allows links succounded by parentheses
// the original is /^[\s\S]+?(?=[\\<!\[_*`~]|https?:\/\/| {2,}\n|$)/
this.rules.text = /^[\s\S]+?(?=[^\w\/]_|[\\<!\[*`~]|https?:\/\/|www\.|\(| {2,}\n|$)/;
this.rules.text = /^[\s\S]+?(?:[^\w\/](?=_)|(?=_\W|[\\<!\[*`~]|https?:\/\/|www\.|\(| {2,}\n|$))/;
// modified version of the regex that allows links starting with www and those surrounded
// by parentheses