summaryrefslogtreecommitdiffstats
path: root/webapp/utils/text_formatting.jsx
Commit message (Collapse)AuthorAgeFilesLines
* Channel link marker changed from ! to ~ (#4433)George Goldberg2016-11-031-5/+5
| | | Fixes PLT-4570
* PLT-4454 Autolink anything that looks like an at mention (#4416)Harrison Healey2016-11-011-23/+11
| | | | | | * PLT-4454 Added autolinking for anything that looks like an at mention * PLT-4454 Added unit tests for at mention autolinking
* PLT-4307 - fix !channel link hrefs. (#4122)George Goldberg2016-09-301-3/+8
| | | | | | * PLT-4307 - fix !channel link hrefs. * Fix style.
* Updating ESLint (#4085)Christopher Speller2016-09-231-3/+3
|
* Updating client dependancies (#4083)Christopher Speller2016-09-231-2/+2
|
* PLT-4096 Fixed highlighting of hashtags in search (#4043)Harrison Healey2016-09-201-2/+2
| | | | | | * PLT-4096 Fixed highlighting of hashtags in search * Added unit tests for hashtag rendering on the client
* PLT-1759 - Auto-complete for !channels when posting messages. (#3890)George Goldberg2016-09-191-3/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Auto-complete for !channels when posting messages. This is part 1 of the fix for PLT-1759 to make channels linkable. Still to do: - Make the !channels clickable when they appear in messages. This is blocked until PR #3865 is resolved as it looks like that refactors some of the code that would be touched by making this change. - Unit tests. Again, I think the above referenced PR should be merged before tackling this. * Fix style problems. * Highlighting of !channel-names in messages. This only identifies the !channel-name (not the display name). The implementation of the auto-complete on channel names now needs to be modified to convert to the channel handle before sending the message. * Display !channel-name as !Display Name. When we encounter !channel-name in a message, display it as a link using the channel's actual name rather than it's handle (name). * Match on names and display name, and use name. * Autocomplete channels matching on both the name and the the display name. * Use the name as the text we fill in instead of the display name. It's potentially a bit ugly, but it minimises complexity for now as otherwise we'd have to do complicated things to the message box. * Fix style issues. * Load more channels everywhere. Whenever we load the list of channels, we should also load the list of more channels. This is to enable auto-completing and auto-linking of all channels whether or not the user is in them currently. * Include more channels in the map for linking. * Listen for channel list updates for autolinking. * Remove accidental console.log. * Autocomplete on more channels too. * i18n for channel autocomplete. * Link directly to channels in !channel mentions. This currently does not work if you aren't a member of that channel. Need to decide what the correct behaviour is in that case. * Fix style issues. * Show channel name and handle in suggestion. * Match channels only at start or after space. * Better matching in text-formatting. Only match channels after a space-type character or at the start in the posts list too. * Move the route construction to make tests work. Moves route-construction out of text_formatting.jsx and into utils.jsx so that the unit tests work once again.
* PLT-1752/PLT-3567/PLT-3998 Highlighting links in search, unit tests for ↵Harrison Healey2016-08-291-55/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | autolinking (#3865) * Added highlighting to links when their URL includes the search term * Decoupling UserStore from react-router to allow for unit tests involving it * PLT-3998 Added SiteURL as an option to be passed into the text formatting code * Removed reference to PreferenceStore and window from TextFormatting * Refactored TextFormatting to remove remaining browser-only code * Updated ChannelHeader and MessageWrapper to match the changes to TextFormatting * Increased max listeners for Preference and Emoji stores * PLT-3832 Added automated unit tests for autolinking * PLT-3567 Rerender posts when mention keywords change * Updated RHS and search to match the changes to TextFormatting * Broke TextFormatting's dependency on the UserStore
* PLT-1424 Added XRegExp library to fix search highlighting (#3787)Harrison Healey2016-08-121-9/+6
|
* PLT-3534 Changed special handling of internal links to only occur for ↵Harrison Healey2016-08-031-1/+1
| | | | permalinks and links to channels (#3731)
* PLT-2408 Adds here mention for online users (#3619)Joram Wilander2016-07-211-0/+1
| | | | | | | | | | * Added @here mention that notifies online users * Fixed existing race condition that would sometime cause clients to miss mention count changes * Added missing localization strings * Prevent @here from mentioning the user who posted it
* Highlight hashtags containing search text (#3568)Harrison Healey2016-07-131-9/+12
|
* PLT-3145 Custom Emojis (#3381)Harrison Healey2016-07-051-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Reorganized Backstage code to use a view controller and separated it from integrations code * Renamed InstalledIntegrations component to BackstageList * Added EmojiList page * Added AddEmoji page * Added custom emoji to autocomplete and text formatter * Moved system emoji to EmojiStore * Stopped trying to get emoji before logging in * Rerender posts when emojis change * Fixed submit handler on backstage pages to properly support enter * Removed debugging code * Updated javascript driver * Fixed unit tests * Fixed backstage routes * Added clientside validation to prevent users from creating an emoji with the same name as a system one * Fixed AddEmoji page to properly redirect when an emoji is created successfully * Fixed updating emoji list when an emoji is deleted * Added type prop to BackstageList to properly support using a table for the list * Added help text to EmojiList * Fixed backstage on smaller screen sizes * Disable custom emoji by default * Improved restrictions on creating emojis * Fixed non-admin users seeing the option to delete each other's emojis * Fixing gofmt * Fixed emoji unit tests * Fixed trying to get emoji from the server when it's disabled
* PLT-3269 Moved formatting toggle behind EnableDeveloper setting (#3402)Harrison Healey2016-06-271-1/+1
| | | | | | * Force formatting to be enabled if testing is disabled * Moved formatting toggle behind EnableDeveloper setting
* PLT-3211 Fixed search highlighting for hashtags starting with "#in", ↵Harrison Healey2016-06-221-4/+8
| | | | | | | | | | "#from", or "#channel" (#3400) * Fixed clicking hashtags/@mentions adding a # to the url * Updated punctuation trimming regex for searching to better match the server * Fixed search term splitting to not break up hashtags starting with a search flag (in, from, etc)
* Adding webpack code splitting (#3377)Christopher Speller2016-06-221-1/+1
|
* Improved internal links which use react-router (#3180)Harrison Healey2016-06-011-1/+7
|
* Removed unnecessary wbrs (#3182)Harrison Healey2016-05-311-3/+0
|
* PLT-1626/PLT-1424/PLT-1473/PLT-1483 Improved search highlighting (#3171)Harrison Healey2016-05-311-11/+31
| | | | | | | | | | | | | | | | * PLT-1626 Stopped breaking up hyphenated hashtags when highlighting search terms * Made hashtag search highlighting case independent * PLT-1424 Improved search highlighting when searching for CJK characters * PLT-1473 Added search term highlighting to single-line code blocks * PLT-1473 Added search term highlighting to code blocks that don't use syntax highlighting * PLT-1483 Added proper highlighting of at mentions * Fixing formatting
* PLT-3080 Added ability to disable formatting for debugging and updated ↵Harrison Healey2016-05-301-3/+9
| | | | | | | | | | marked to fix errors (#3141) * Removed injectIntl from user_settings_advanced.jsx * Added setting to disable formatting for debugging * Updated fork of marked
* PLT-2321 Move the toggle icon next to the link being previewed (#3071)samogot2016-05-271-0/+12
| | | | | | | | | | | | | | * PLT-2321 Move the toggle icon next to the link being previewed only applicable to one-line messages started with link * remove useless "Youtube" header when no title is available * allow breaking long links instead of toggle * simplify "/" to "/<wbr />" replacing fix empty post without additional content body * discard buggy "simplification"
* Updating client dependancies and ESLint (#2954)Christopher Speller2016-05-121-1/+1
| | | | | | | | * Updating client dependancies * Fixing eslint errors with updates * Updating eslint
* PLT-2816 Fixed handling of Unicode 8 emojis (#2924)Harrison Healey2016-05-091-4/+12
| | | | | | | | | | | | * Updated twemoji to properly recognize Unicode 8.0 emojis * Updated unicode emoji parser to only render emojis we support as images * Corrected filename for South African flag emoji * Added Mattermost emoticons! * Added additional emoticons to test files
* Moved twemoji parsing so that it doesn't occur inside of code blocks (#2896)Harrison Healey2016-05-051-0/+9
|
* Fixed updating mention keys when a user's username changes (#2774)Harrison Healey2016-04-251-1/+0
|
* PLT-1236 Added special handling for markdown links within mattermost (#2763)Harrison Healey2016-04-221-0/+4
| | | | | | * Added special handling for markdown links within mattermost * Moved application of .app__body class to route components
* Changed mention parser to ignore empty string mentionsHarrison Healey2016-03-171-0/+5
|
* Converting to Webpack. Stage 1.Christopher Speller2016-03-161-0/+402