Merge pull request #1252 from matrix-org/luke/fix-search-results-event-ids

Only apply room pills to matrix.to room links, exclude event links
pull/21833/head
David Baker 2017-07-27 13:26:34 +01:00 committed by GitHub
commit 9be433d833
1 changed files with 2 additions and 2 deletions

View File

@ -25,8 +25,8 @@ import { getDisplayAliasForRoom } from '../../../Rooms';
const REGEX_MATRIXTO = new RegExp(MATRIXTO_URL_PATTERN);
// For URLs of matrix.to links in the timeline which have been reformatted by
// HttpUtils transformTags to relative links
const REGEX_LOCAL_MATRIXTO = /^#\/(?:user|room)\/(([\#\!\@\+]).*)$/;
// HttpUtils transformTags to relative links. This excludes event URLs (with `[^\/]*`)
const REGEX_LOCAL_MATRIXTO = /^#\/(?:user|room)\/(([\#\!\@\+])[^\/]*)$/;
const Pill = React.createClass({
statics: {