Issue 5121 github links are broken
parent
23ac196122
commit
b50a2dc5b2
|
@ -79,16 +79,6 @@ class WysiwygService
|
|||
|
||||
return '[' + title + '](' + link + ')'
|
||||
|
||||
|
||||
linkTitleWithSpaces: (text) ->
|
||||
link = /\[[^\]]*\]\(([^\)]*)\)/g # [Title-with-spaces](Title with spaces)
|
||||
|
||||
return text.replace link, (match, p1, offset, str) ->
|
||||
if p1.indexOf(' ') >= 0
|
||||
return match.replace /\(.*\)/, '(' + taiga.slugify(p1) + ')'
|
||||
else
|
||||
return match
|
||||
|
||||
replaceUrls: (html) ->
|
||||
el = document.createElement( 'html' )
|
||||
el.innerHTML = html
|
||||
|
@ -223,7 +213,6 @@ class WysiwygService
|
|||
|
||||
text = @.replaceEmojiNameByImgs(text)
|
||||
text = @.pipeLinks(text)
|
||||
text = @.linkTitleWithSpaces(text)
|
||||
|
||||
md = window.markdownit({
|
||||
breaks: true
|
||||
|
|
Loading…
Reference in New Issue