summaryrefslogtreecommitdiff
path: root/src/mfm/parse/elements/link.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/mfm/parse/elements/link.ts')
-rw-r--r--src/mfm/parse/elements/link.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mfm/parse/elements/link.ts b/src/mfm/parse/elements/link.ts
index b353aebc5c..796aeb1ab3 100644
--- a/src/mfm/parse/elements/link.ts
+++ b/src/mfm/parse/elements/link.ts
@@ -13,7 +13,7 @@ export type TextElementLink = {
export default function(text: string) {
const match = text.match(/^\??\[([^\[\]]+?)\]\((https?:\/\/[\w\/:%#@\$&\?!\(\)\[\]~\.=\+\-]+?)\)/);
if (!match) return null;
- const silent = text[0] == '?';
+ const silent = text.startsWith('?');
const link = match[0];
const title = match[1];
const url = match[2];