From be51b515cfe837b7476f34e75c029c284c8c1cc9 Mon Sep 17 00:00:00 2001 From: Matt Lewis Date: Wed, 12 Apr 2017 15:21:33 +0100 Subject: [PATCH] twitter-text: add missing auto link options --- types/twitter-text/index.d.ts | 2 ++ types/twitter-text/twitter-text-tests.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/types/twitter-text/index.d.ts b/types/twitter-text/index.d.ts index e12cfc59a9..accac12333 100644 --- a/types/twitter-text/index.d.ts +++ b/types/twitter-text/index.d.ts @@ -72,6 +72,8 @@ export interface AutoLinkOptions { htmlAttrs?: string; invisibleTagAttrs?: string; htmlEscapeNonEntities?: boolean; + targetBlank?: boolean; + suppressNoFollow?: boolean; urlEntities?: UrlEntity[]; } diff --git a/types/twitter-text/twitter-text-tests.ts b/types/twitter-text/twitter-text-tests.ts index 708bdcfcb1..c1cc0917e0 100644 --- a/types/twitter-text/twitter-text-tests.ts +++ b/types/twitter-text/twitter-text-tests.ts @@ -41,7 +41,7 @@ result = twitter.autoLink(text); result = twitter.autoLinkUsernamesOrLists(text); result = twitter.autoLinkHashtags(text); result = twitter.autoLinkCashtags(text); -result = twitter.autoLinkUrlsCustom(text); +result = twitter.autoLinkUrlsCustom(text, {targetBlank: true, suppressNoFollow: true}); const len: number = twitter.getTweetLength(text);