mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-09-13 14:22:25 +03:00
Add URL preview (#1511)
* URL preview - WIP * fix url preview regex * update url match regex * add url preview components * add scroll btn url preview holder * add message body component * add url preview toggle in settings * update url regex * improve url regex * increase thumbnail size in url preview * hide url preview in encrypted rooms * add encrypted room url preview toggle
This commit is contained in:
parent
a98903a85b
commit
9f9173c691
11 changed files with 444 additions and 42 deletions
|
@ -1,3 +1,5 @@
|
|||
export const HTTP_URL_PATTERN = `https?:\\/\\/(?:www\\.)?(?:[^\\s)]*)(?<![.,:;!/?()[\\]\\s]+)`;
|
||||
|
||||
export const URL_NEG_LB = '(?<!(https?|ftp|mailto|magnet):\\/\\/\\S*)';
|
||||
|
||||
// https://en.wikipedia.org/wiki/Variation_Selectors_(Unicode_block)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue