Commit Graph

9 Commits

Author SHA1 Message Date
Bart Enkelaar
920a093b0e 12922 - Use absolute user URLs on production (#12968) 2021-04-29 15:23:42 -05:00
Bart Enkelaar
7c4faf8b7a fix(chat) - issue 12586 - can't put links without titles in message boxes (#12594) 2020-09-22 19:28:37 +02:00
Bart Enkelaar
1c00d7de5b Fix empty link bug and proper error logging in highlightMentions.js (#12228)
* fix(chat) - Don't insert user link in url-less link and properly log source-mapping failures

* fix(chat) - Add link to markdown spec and list of known issues

* fix(chat) - Log regular expression as String
2020-05-31 18:09:43 +02:00
Bart Enkelaar
26f5bf554e fix(chat) - graceful for failure and fix link regex (#12225)
* fix(chat) - graceful for failure and fix link regex

* fix(chat) - Adjust unit test to test for the actual functional failure
2020-05-21 18:00:58 +02:00
Bart Enkelaar
85d290a1fa fix(chat) - Issue 12217 - Allow url-escapable characters in links. (#12218) 2020-05-19 17:28:55 +02:00
Bart Enkelaar
ef99943646 Don't break up links with user profile link injections (#12100)
* Issue 10924 - Don't break up links with mention links

* Issue 10924 - Recognise links between brackets.

* Issue 10924 - Rely on markdown parser for link determination

* Issue 10924 - Only increment index once in findTextBlocks
2020-05-09 19:37:08 +02:00
Bart Enkelaar
ec5de91123 Issue 12138 - Fix chat support for regex chars in code blocks 2020-04-27 20:24:59 +02:00
Matteo Pagliazzi
188023b197 fix #12118: pass mandatory second parameter to markdown-it parse method 2020-04-24 12:06:05 +02:00
Bart Enkelaar
9608b9fa9f Don't link user in markdown code blocks - Fixes #[11504] (#12069)
* Improve whitespacing in highlightMentions.js unit test

* Issue 11504 - Don't link users in markdown code blocks

Use the markdown-it parser to determine what parts of the message are code block first.
Then work from those parser tokens back to content parts that should not be handled.

Still convoluted, but can be improved once a "user mention plugin" is added to habitica-markdown.

* Issue 11504 - Put functions in JavaScript order and fix linting issues

* Issue 11504 - Use includes i.o. multiple or checks and added some context.

* Issue 11504 - Add docstring for highlightMentions and simplify fence regex

* Issue 11504 - Replace inline recursor with default parameter value
2020-04-17 22:19:11 +02:00