You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-30 02:21:17 +03:00
Refactor matrix-linkify module (#7279)
Refactor the module to make it easier for upgrade and proper separation of code contexts
This commit is contained in:
@ -13,12 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
import * as linkify from "linkifyjs";
|
||||
import linkifyMatrix from '../src/linkify-matrix';
|
||||
|
||||
beforeAll(() => {
|
||||
linkifyMatrix(linkify);
|
||||
});
|
||||
import { linkify } from '../src/linkify-matrix';
|
||||
|
||||
describe('linkify-matrix', () => {
|
||||
describe('roomalias', () => {
|
||||
@ -74,7 +69,6 @@ describe('linkify-matrix', () => {
|
||||
href: "#foo:bar.com",
|
||||
type: "roomalias",
|
||||
value: "#foo:bar.com",
|
||||
|
||||
}]));
|
||||
});
|
||||
it('accept :NUM (port specifier)', () => {
|
||||
@ -93,7 +87,6 @@ describe('linkify-matrix', () => {
|
||||
href: "#foo:bar.com",
|
||||
type: "roomalias",
|
||||
value: "#foo:bar.com",
|
||||
|
||||
}]));
|
||||
});
|
||||
it('properly parses room alias with dots in name', () => {
|
||||
@ -103,7 +96,6 @@ describe('linkify-matrix', () => {
|
||||
href: "#foo.asdf:bar.com",
|
||||
type: "roomalias",
|
||||
value: "#foo.asdf:bar.com",
|
||||
|
||||
}]));
|
||||
});
|
||||
it('does not parse room alias with too many separators', () => {
|
||||
|
Reference in New Issue
Block a user