You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: conformance/extract.yml
+38Lines changed: 38 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -664,6 +664,44 @@ tests:
664
664
- url: "http://foobar.پاکستان/"
665
665
indices: [42, 64]
666
666
667
+
urls_with_directional_markers:
668
+
- description: "Extract URLs from RTL text"
669
+
text: "\U00002066\U0000202Atest abcdef.com پاکستان http://twitter.com/\U0000202C\U00002069"
670
+
expected:
671
+
- url: "abcdef.com"
672
+
indices: [7, 17]
673
+
- url: "http://twitter.com/"
674
+
indices: [26, 45]
675
+
676
+
- description: "Extract URLs from RTL text with embedded directional marks"
677
+
text: "This is a test \U00002066\U0000202Atwitter.com\U0000202C\U00002069\U00002066\U0000202Ahttp://foobar.پاکستان/\U0000202C\U00002069 قطر فلسطين عمان"
678
+
expected:
679
+
- url: "twitter.com"
680
+
indices: [17, 28]
681
+
- url: "http://foobar.پاکستان/"
682
+
indices: [33, 55]
683
+
684
+
tco_urls_with_params:
685
+
- description: "Extract valid URL with params: https://t.co/UqIyJAJTfo?amp=1"
686
+
text: "text https://t.co/UqIyJAJTfo?amp=1"
687
+
expected: ["https://t.co/UqIyJAJTfo?amp=1"]
688
+
689
+
- description: "Extract valid URL with params: https://t.co/UqIyJAJTfo?type=js"
690
+
text: "text https://t.co/UqIyJAJTfo?type=js"
691
+
expected: ["https://t.co/UqIyJAJTfo?type=js"]
692
+
693
+
- description: "Extract valid URL with params: https://t.co/UqIyJAJTfo?ssr=true"
694
+
text: "text https://t.co/UqIyJAJTfo?ssr=true"
695
+
expected: ["https://t.co/UqIyJAJTfo?ssr=true"]
696
+
697
+
- description: "Extract a valid URL with params: https://t.co/asdfdf?a=b#123"
698
+
text: "text https://t.co/asdfdf?a=b#123"
699
+
expected: ["https://t.co/asdfdf?a=b#123"]
700
+
701
+
- description: "Extract a valid URL with params: https://t.co/sadfasdf?a=b&c=d"
702
+
text: "text https://t.co/sadfasdf?a=b&c=d"
703
+
expected: ["https://t.co/sadfasdf?a=b&c=d"]
704
+
667
705
hashtags:
668
706
- description: "Extract hashtag after emoji without variant selector (uFE0E or uFE0F)"
0 commit comments