summaryrefslogtreecommitdiff
path: root/src/text/parse/elements/link.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-06-21 01:21:57 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-06-21 01:21:57 +0900
commit79d1bf30a49e1fd1ef1f8b743a9aff84d104fb89 (patch)
treeed8f50f01cc50cf851dc0d0f399ed7e0f514f6c6 /src/text/parse/elements/link.ts
parentDisable transitions to avoid memory leak (diff)
downloadsharkey-79d1bf30a49e1fd1ef1f8b743a9aff84d104fb89.tar.gz
sharkey-79d1bf30a49e1fd1ef1f8b743a9aff84d104fb89.tar.bz2
sharkey-79d1bf30a49e1fd1ef1f8b743a9aff84d104fb89.zip
リモートユーザーのHTMLで表現されたプロフィールをMFMに変換するように
Diffstat (limited to 'src/text/parse/elements/link.ts')
-rw-r--r--src/text/parse/elements/link.ts27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/text/parse/elements/link.ts b/src/text/parse/elements/link.ts
deleted file mode 100644
index b353aebc5c..0000000000
--- a/src/text/parse/elements/link.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Link
- */
-
-export type TextElementLink = {
- type: 'link'
- content: string
- title: string
- url: string
- silent: boolean
-};
-
-export default function(text: string) {
- const match = text.match(/^\??\[([^\[\]]+?)\]\((https?:\/\/[\w\/:%#@\$&\?!\(\)\[\]~\.=\+\-]+?)\)/);
- if (!match) return null;
- const silent = text[0] == '?';
- const link = match[0];
- const title = match[1];
- const url = match[2];
- return {
- type: 'link',
- content: link,
- title: title,
- url: url,
- silent: silent
- } as TextElementLink;
-}