twitter-text 1.11.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/assets/tld_lib.yml +216 -82
- data/lib/twitter-text/autolink.rb +1 -1
- data/lib/twitter-text/regex.rb +2 -2
- data/lib/twitter-text/rewriter.rb +7 -3
- data/twitter-text.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a706e8ee1d21343caef2e2b896874b3f9090a9a2
|
|
4
|
+
data.tar.gz: 827debc4bafe00c2ea02ee1301357b82dbcccefa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb821bc90373b97cb25906f3a6df862e8b01a6786d2d2f3202557630406185800447095458d77daabf78045bd555ee849b35bfc8ffb9af2357ee4402abe5f3f5
|
|
7
|
+
data.tar.gz: ff2af029c1489c365648f6c7f5dff51fb0fad6b284917a9f1347cb131ae4bee5c13cf49219720dc6e49945e2673b774323d8edda9bfc36f761cf1defada678b8
|
data/lib/assets/tld_lib.yml
CHANGED
|
@@ -255,63 +255,70 @@ country:
|
|
|
255
255
|
- za
|
|
256
256
|
- zm
|
|
257
257
|
- zw
|
|
258
|
-
-
|
|
259
|
-
-
|
|
260
|
-
-
|
|
261
|
-
-
|
|
262
|
-
-
|
|
263
|
-
-
|
|
264
|
-
-
|
|
265
|
-
-
|
|
266
|
-
-
|
|
267
|
-
-
|
|
268
|
-
-
|
|
269
|
-
-
|
|
270
|
-
-
|
|
271
|
-
-
|
|
272
|
-
-
|
|
273
|
-
-
|
|
274
|
-
-
|
|
275
|
-
-
|
|
276
|
-
-
|
|
277
|
-
-
|
|
278
|
-
-
|
|
279
|
-
-
|
|
280
|
-
-
|
|
281
|
-
-
|
|
282
|
-
-
|
|
283
|
-
-
|
|
284
|
-
-
|
|
285
|
-
-
|
|
286
|
-
-
|
|
287
|
-
-
|
|
288
|
-
-
|
|
289
|
-
-
|
|
290
|
-
-
|
|
291
|
-
-
|
|
292
|
-
-
|
|
293
|
-
-
|
|
294
|
-
-
|
|
295
|
-
-
|
|
296
|
-
-
|
|
297
|
-
-
|
|
298
|
-
-
|
|
299
|
-
-
|
|
300
|
-
-
|
|
301
|
-
-
|
|
258
|
+
- бел
|
|
259
|
+
- мкд
|
|
260
|
+
- мон
|
|
261
|
+
- рф
|
|
262
|
+
- срб
|
|
263
|
+
- укр
|
|
264
|
+
- қаз
|
|
265
|
+
- հայ
|
|
266
|
+
- الاردن
|
|
267
|
+
- الجزائر
|
|
268
|
+
- السعودية
|
|
269
|
+
- المغرب
|
|
270
|
+
- امارات
|
|
271
|
+
- ایران
|
|
272
|
+
- بھارت
|
|
273
|
+
- تونس
|
|
274
|
+
- سودان
|
|
275
|
+
- سورية
|
|
276
|
+
- عراق
|
|
277
|
+
- عمان
|
|
278
|
+
- فلسطين
|
|
279
|
+
- قطر
|
|
280
|
+
- مصر
|
|
281
|
+
- مليسيا
|
|
282
|
+
- پاکستان
|
|
283
|
+
- भारत
|
|
284
|
+
- বাংলা
|
|
285
|
+
- ভারত
|
|
286
|
+
- ਭਾਰਤ
|
|
287
|
+
- ભારત
|
|
288
|
+
- இந்தியா
|
|
289
|
+
- இலங்கை
|
|
290
|
+
- சிங்கப்பூர்
|
|
291
|
+
- భారత్
|
|
292
|
+
- ලංකා
|
|
293
|
+
- ไทย
|
|
294
|
+
- გე
|
|
295
|
+
- 中国
|
|
296
|
+
- 中國
|
|
297
|
+
- 台湾
|
|
298
|
+
- 台灣
|
|
299
|
+
- 新加坡
|
|
300
|
+
- 澳門
|
|
301
|
+
- 香港
|
|
302
|
+
- 한국
|
|
302
303
|
generic:
|
|
304
|
+
- abbott
|
|
303
305
|
- abogado
|
|
304
306
|
- academy
|
|
307
|
+
- accountant
|
|
305
308
|
- accountants
|
|
306
309
|
- active
|
|
307
310
|
- actor
|
|
311
|
+
- ads
|
|
308
312
|
- adult
|
|
309
313
|
- aero
|
|
314
|
+
- afl
|
|
310
315
|
- agency
|
|
311
316
|
- airforce
|
|
312
317
|
- allfinanz
|
|
313
318
|
- alsace
|
|
319
|
+
- amsterdam
|
|
314
320
|
- android
|
|
321
|
+
- apartments
|
|
315
322
|
- aquarelle
|
|
316
323
|
- archi
|
|
317
324
|
- army
|
|
@@ -324,14 +331,20 @@ generic:
|
|
|
324
331
|
- autos
|
|
325
332
|
- axa
|
|
326
333
|
- band
|
|
334
|
+
- bank
|
|
327
335
|
- bar
|
|
336
|
+
- barclaycard
|
|
337
|
+
- barclays
|
|
328
338
|
- bargains
|
|
339
|
+
- bauhaus
|
|
329
340
|
- bayern
|
|
341
|
+
- bbc
|
|
330
342
|
- beer
|
|
331
343
|
- berlin
|
|
332
344
|
- best
|
|
333
345
|
- bid
|
|
334
346
|
- bike
|
|
347
|
+
- bingo
|
|
335
348
|
- bio
|
|
336
349
|
- biz
|
|
337
350
|
- black
|
|
@@ -340,6 +353,8 @@ generic:
|
|
|
340
353
|
- blue
|
|
341
354
|
- bmw
|
|
342
355
|
- bnpparibas
|
|
356
|
+
- boats
|
|
357
|
+
- bond
|
|
343
358
|
- boo
|
|
344
359
|
- boutique
|
|
345
360
|
- brussels
|
|
@@ -350,10 +365,12 @@ generic:
|
|
|
350
365
|
- buzz
|
|
351
366
|
- bzh
|
|
352
367
|
- cab
|
|
368
|
+
- cafe
|
|
353
369
|
- cal
|
|
354
370
|
- camera
|
|
355
371
|
- camp
|
|
356
372
|
- cancerresearch
|
|
373
|
+
- canon
|
|
357
374
|
- capetown
|
|
358
375
|
- capital
|
|
359
376
|
- caravan
|
|
@@ -364,13 +381,18 @@ generic:
|
|
|
364
381
|
- cartier
|
|
365
382
|
- casa
|
|
366
383
|
- cash
|
|
384
|
+
- casino
|
|
367
385
|
- cat
|
|
368
386
|
- catering
|
|
387
|
+
- cbn
|
|
369
388
|
- center
|
|
370
389
|
- ceo
|
|
371
390
|
- cern
|
|
391
|
+
- cfd
|
|
372
392
|
- channel
|
|
393
|
+
- chat
|
|
373
394
|
- cheap
|
|
395
|
+
- chloe
|
|
374
396
|
- christmas
|
|
375
397
|
- chrome
|
|
376
398
|
- church
|
|
@@ -399,6 +421,7 @@ generic:
|
|
|
399
421
|
- cool
|
|
400
422
|
- coop
|
|
401
423
|
- country
|
|
424
|
+
- courses
|
|
402
425
|
- credit
|
|
403
426
|
- creditcard
|
|
404
427
|
- cricket
|
|
@@ -406,10 +429,15 @@ generic:
|
|
|
406
429
|
- cruises
|
|
407
430
|
- cuisinella
|
|
408
431
|
- cymru
|
|
432
|
+
- cyou
|
|
433
|
+
- dabur
|
|
409
434
|
- dad
|
|
410
435
|
- dance
|
|
436
|
+
- date
|
|
411
437
|
- dating
|
|
438
|
+
- datsun
|
|
412
439
|
- day
|
|
440
|
+
- dclk
|
|
413
441
|
- deals
|
|
414
442
|
- degree
|
|
415
443
|
- delivery
|
|
@@ -417,6 +445,8 @@ generic:
|
|
|
417
445
|
- dental
|
|
418
446
|
- dentist
|
|
419
447
|
- desi
|
|
448
|
+
- design
|
|
449
|
+
- dev
|
|
420
450
|
- diamonds
|
|
421
451
|
- diet
|
|
422
452
|
- digital
|
|
@@ -424,7 +454,11 @@ generic:
|
|
|
424
454
|
- directory
|
|
425
455
|
- discount
|
|
426
456
|
- dnp
|
|
457
|
+
- docs
|
|
458
|
+
- doha
|
|
427
459
|
- domains
|
|
460
|
+
- doosan
|
|
461
|
+
- download
|
|
428
462
|
- durban
|
|
429
463
|
- dvag
|
|
430
464
|
- eat
|
|
@@ -436,7 +470,9 @@ generic:
|
|
|
436
470
|
- engineer
|
|
437
471
|
- engineering
|
|
438
472
|
- enterprises
|
|
473
|
+
- epson
|
|
439
474
|
- equipment
|
|
475
|
+
- erni
|
|
440
476
|
- esq
|
|
441
477
|
- estate
|
|
442
478
|
- eurovision
|
|
@@ -446,21 +482,30 @@ generic:
|
|
|
446
482
|
- exchange
|
|
447
483
|
- expert
|
|
448
484
|
- exposed
|
|
485
|
+
- express
|
|
449
486
|
- fail
|
|
487
|
+
- faith
|
|
488
|
+
- fan
|
|
489
|
+
- fans
|
|
450
490
|
- farm
|
|
451
491
|
- fashion
|
|
452
492
|
- feedback
|
|
493
|
+
- film
|
|
453
494
|
- finance
|
|
454
495
|
- financial
|
|
455
496
|
- firmdale
|
|
456
497
|
- fish
|
|
457
498
|
- fishing
|
|
499
|
+
- fit
|
|
458
500
|
- fitness
|
|
459
501
|
- flights
|
|
460
502
|
- florist
|
|
503
|
+
- flowers
|
|
461
504
|
- flsmidth
|
|
462
505
|
- fly
|
|
463
506
|
- foo
|
|
507
|
+
- football
|
|
508
|
+
- forex
|
|
464
509
|
- forsale
|
|
465
510
|
- foundation
|
|
466
511
|
- frl
|
|
@@ -470,8 +515,11 @@ generic:
|
|
|
470
515
|
- futbol
|
|
471
516
|
- gal
|
|
472
517
|
- gallery
|
|
518
|
+
- garden
|
|
473
519
|
- gbiz
|
|
520
|
+
- gdn
|
|
474
521
|
- gent
|
|
522
|
+
- ggee
|
|
475
523
|
- gift
|
|
476
524
|
- gifts
|
|
477
525
|
- gives
|
|
@@ -482,6 +530,11 @@ generic:
|
|
|
482
530
|
- gmail
|
|
483
531
|
- gmo
|
|
484
532
|
- gmx
|
|
533
|
+
- gold
|
|
534
|
+
- goldpoint
|
|
535
|
+
- golf
|
|
536
|
+
- goo
|
|
537
|
+
- goog
|
|
485
538
|
- google
|
|
486
539
|
- gop
|
|
487
540
|
- gov
|
|
@@ -489,14 +542,17 @@ generic:
|
|
|
489
542
|
- gratis
|
|
490
543
|
- green
|
|
491
544
|
- gripe
|
|
545
|
+
- guge
|
|
492
546
|
- guide
|
|
493
547
|
- guitars
|
|
494
548
|
- guru
|
|
495
549
|
- hamburg
|
|
550
|
+
- hangout
|
|
496
551
|
- haus
|
|
497
552
|
- healthcare
|
|
498
553
|
- help
|
|
499
554
|
- here
|
|
555
|
+
- hermes
|
|
500
556
|
- hiphop
|
|
501
557
|
- hiv
|
|
502
558
|
- holdings
|
|
@@ -508,9 +564,11 @@ generic:
|
|
|
508
564
|
- house
|
|
509
565
|
- how
|
|
510
566
|
- ibm
|
|
567
|
+
- ifm
|
|
511
568
|
- immo
|
|
512
569
|
- immobilien
|
|
513
570
|
- industries
|
|
571
|
+
- infiniti
|
|
514
572
|
- info
|
|
515
573
|
- ing
|
|
516
574
|
- ink
|
|
@@ -520,42 +578,58 @@ generic:
|
|
|
520
578
|
- international
|
|
521
579
|
- investments
|
|
522
580
|
- irish
|
|
581
|
+
- iwc
|
|
582
|
+
- java
|
|
583
|
+
- jcb
|
|
523
584
|
- jetzt
|
|
585
|
+
- jewelry
|
|
524
586
|
- jobs
|
|
525
587
|
- joburg
|
|
526
588
|
- juegos
|
|
527
589
|
- kaufen
|
|
590
|
+
- kddi
|
|
528
591
|
- kim
|
|
529
592
|
- kitchen
|
|
530
593
|
- kiwi
|
|
531
594
|
- koeln
|
|
595
|
+
- komatsu
|
|
532
596
|
- krd
|
|
533
597
|
- kred
|
|
598
|
+
- kyoto
|
|
534
599
|
- lacaixa
|
|
535
600
|
- land
|
|
601
|
+
- lat
|
|
536
602
|
- latrobe
|
|
537
603
|
- lawyer
|
|
538
604
|
- lds
|
|
539
605
|
- lease
|
|
606
|
+
- leclerc
|
|
540
607
|
- legal
|
|
541
608
|
- lgbt
|
|
609
|
+
- lidl
|
|
542
610
|
- life
|
|
543
611
|
- lighting
|
|
544
612
|
- limited
|
|
545
613
|
- limo
|
|
546
614
|
- link
|
|
615
|
+
- loan
|
|
547
616
|
- loans
|
|
548
617
|
- london
|
|
618
|
+
- lotte
|
|
549
619
|
- lotto
|
|
620
|
+
- love
|
|
550
621
|
- ltda
|
|
551
622
|
- luxe
|
|
552
623
|
- luxury
|
|
553
624
|
- madrid
|
|
625
|
+
- maif
|
|
554
626
|
- maison
|
|
555
627
|
- management
|
|
556
628
|
- mango
|
|
557
629
|
- market
|
|
558
630
|
- marketing
|
|
631
|
+
- markets
|
|
632
|
+
- marriott
|
|
559
633
|
- media
|
|
560
634
|
- meet
|
|
561
635
|
- melbourne
|
|
@@ -565,6 +639,7 @@ generic:
|
|
|
565
639
|
- miami
|
|
566
640
|
- mil
|
|
567
641
|
- mini
|
|
642
|
+
- mma
|
|
568
643
|
- mobi
|
|
569
644
|
- moda
|
|
570
645
|
- moe
|
|
@@ -575,6 +650,9 @@ generic:
|
|
|
575
650
|
- moscow
|
|
576
651
|
- motorcycles
|
|
577
652
|
- mov
|
|
653
|
+
- movie
|
|
654
|
+
- mtn
|
|
655
|
+
- mtpc
|
|
578
656
|
- museum
|
|
579
657
|
- nagoya
|
|
580
658
|
- name
|
|
@@ -583,21 +661,30 @@ generic:
|
|
|
583
661
|
- network
|
|
584
662
|
- neustar
|
|
585
663
|
- new
|
|
664
|
+
- news
|
|
586
665
|
- nexus
|
|
587
666
|
- ngo
|
|
588
667
|
- nhk
|
|
668
|
+
- nico
|
|
589
669
|
- ninja
|
|
670
|
+
- nissan
|
|
590
671
|
- nra
|
|
591
672
|
- nrw
|
|
673
|
+
- ntt
|
|
592
674
|
- nyc
|
|
593
675
|
- okinawa
|
|
676
|
+
- one
|
|
594
677
|
- ong
|
|
595
678
|
- onl
|
|
679
|
+
- online
|
|
596
680
|
- ooo
|
|
597
681
|
- org
|
|
598
682
|
- organic
|
|
683
|
+
- osaka
|
|
599
684
|
- otsuka
|
|
600
685
|
- ovh
|
|
686
|
+
- page
|
|
687
|
+
- panerai
|
|
601
688
|
- paris
|
|
602
689
|
- partners
|
|
603
690
|
- parts
|
|
@@ -607,12 +694,15 @@ generic:
|
|
|
607
694
|
- photography
|
|
608
695
|
- photos
|
|
609
696
|
- physio
|
|
697
|
+
- piaget
|
|
610
698
|
- pics
|
|
699
|
+
- pictet
|
|
611
700
|
- pictures
|
|
612
701
|
- pink
|
|
613
702
|
- pizza
|
|
614
703
|
- place
|
|
615
704
|
- plumbing
|
|
705
|
+
- plus
|
|
616
706
|
- pohl
|
|
617
707
|
- poker
|
|
618
708
|
- porn
|
|
@@ -628,9 +718,11 @@ generic:
|
|
|
628
718
|
- pub
|
|
629
719
|
- qpon
|
|
630
720
|
- quebec
|
|
721
|
+
- racing
|
|
631
722
|
- realtor
|
|
632
723
|
- recipes
|
|
633
724
|
- red
|
|
725
|
+
- redstone
|
|
634
726
|
- rehab
|
|
635
727
|
- reise
|
|
636
728
|
- reisen
|
|
@@ -642,6 +734,7 @@ generic:
|
|
|
642
734
|
- republican
|
|
643
735
|
- rest
|
|
644
736
|
- restaurant
|
|
737
|
+
- review
|
|
645
738
|
- reviews
|
|
646
739
|
- rich
|
|
647
740
|
- rio
|
|
@@ -652,27 +745,45 @@ generic:
|
|
|
652
745
|
- ruhr
|
|
653
746
|
- ryukyu
|
|
654
747
|
- saarland
|
|
748
|
+
- sale
|
|
655
749
|
- samsung
|
|
750
|
+
- sap
|
|
656
751
|
- sarl
|
|
752
|
+
- saxo
|
|
657
753
|
- sca
|
|
658
754
|
- scb
|
|
659
755
|
- schmidt
|
|
756
|
+
- scholarships
|
|
757
|
+
- school
|
|
660
758
|
- schule
|
|
759
|
+
- schwarz
|
|
661
760
|
- science
|
|
662
761
|
- scot
|
|
762
|
+
- seat
|
|
663
763
|
- services
|
|
764
|
+
- sew
|
|
765
|
+
- sex
|
|
664
766
|
- sexy
|
|
665
767
|
- shiksha
|
|
666
768
|
- shoes
|
|
769
|
+
- show
|
|
770
|
+
- shriram
|
|
667
771
|
- singles
|
|
772
|
+
- site
|
|
773
|
+
- sky
|
|
668
774
|
- social
|
|
669
775
|
- software
|
|
670
776
|
- sohu
|
|
671
777
|
- solar
|
|
672
778
|
- solutions
|
|
779
|
+
- sony
|
|
673
780
|
- soy
|
|
674
781
|
- space
|
|
675
782
|
- spiegel
|
|
783
|
+
- spreadbetting
|
|
784
|
+
- study
|
|
785
|
+
- style
|
|
786
|
+
- sucks
|
|
676
787
|
- supplies
|
|
677
788
|
- supply
|
|
678
789
|
- support
|
|
@@ -685,18 +796,27 @@ generic:
|
|
|
685
796
|
- tatar
|
|
686
797
|
- tattoo
|
|
687
798
|
- tax
|
|
799
|
+
- team
|
|
800
|
+
- tech
|
|
688
801
|
- technology
|
|
689
802
|
- tel
|
|
803
|
+
- temasek
|
|
804
|
+
- tennis
|
|
805
|
+
- tickets
|
|
690
806
|
- tienda
|
|
691
807
|
- tips
|
|
808
|
+
- tires
|
|
692
809
|
- tirol
|
|
693
810
|
- today
|
|
694
811
|
- tokyo
|
|
695
812
|
- tools
|
|
696
813
|
- top
|
|
814
|
+
- toshiba
|
|
815
|
+
- tours
|
|
697
816
|
- town
|
|
698
817
|
- toys
|
|
699
818
|
- trade
|
|
819
|
+
- trading
|
|
700
820
|
- training
|
|
701
821
|
- travel
|
|
702
822
|
- trust
|
|
@@ -712,6 +832,7 @@ generic:
|
|
|
712
832
|
- versicherung
|
|
713
833
|
- vet
|
|
714
834
|
- viajes
|
|
835
|
+
- video
|
|
715
836
|
- villas
|
|
716
837
|
- vision
|
|
717
838
|
- vlaanderen
|
|
@@ -727,61 +848,74 @@ generic:
|
|
|
727
848
|
- website
|
|
728
849
|
- wed
|
|
729
850
|
- wedding
|
|
851
|
+
- weir
|
|
730
852
|
- whoswho
|
|
731
853
|
- wien
|
|
732
854
|
- wiki
|
|
733
855
|
- williamhill
|
|
856
|
+
- win
|
|
734
857
|
- wme
|
|
735
858
|
- work
|
|
736
859
|
- works
|
|
737
860
|
- world
|
|
738
861
|
- wtc
|
|
739
862
|
- wtf
|
|
863
|
+
- xerox
|
|
864
|
+
- xin
|
|
740
865
|
- xxx
|
|
741
866
|
- xyz
|
|
742
867
|
- yachts
|
|
743
868
|
- yandex
|
|
869
|
+
- yodobashi
|
|
744
870
|
- yoga
|
|
745
871
|
- yokohama
|
|
746
872
|
- youtube
|
|
747
873
|
- zip
|
|
748
874
|
- zone
|
|
749
|
-
-
|
|
750
|
-
-
|
|
751
|
-
-
|
|
752
|
-
-
|
|
753
|
-
-
|
|
754
|
-
-
|
|
755
|
-
-
|
|
756
|
-
-
|
|
757
|
-
-
|
|
758
|
-
-
|
|
759
|
-
-
|
|
760
|
-
-
|
|
761
|
-
-
|
|
762
|
-
-
|
|
763
|
-
-
|
|
764
|
-
-
|
|
765
|
-
-
|
|
766
|
-
-
|
|
767
|
-
-
|
|
768
|
-
-
|
|
769
|
-
-
|
|
770
|
-
-
|
|
771
|
-
-
|
|
772
|
-
-
|
|
773
|
-
-
|
|
774
|
-
-
|
|
775
|
-
-
|
|
776
|
-
-
|
|
777
|
-
-
|
|
778
|
-
-
|
|
779
|
-
-
|
|
780
|
-
-
|
|
781
|
-
-
|
|
782
|
-
-
|
|
783
|
-
-
|
|
784
|
-
-
|
|
785
|
-
-
|
|
786
|
-
-
|
|
875
|
+
- zuerich
|
|
876
|
+
- дети
|
|
877
|
+
- москва
|
|
878
|
+
- онлайн
|
|
879
|
+
- орг
|
|
880
|
+
- рус
|
|
881
|
+
- сайт
|
|
882
|
+
- بازار
|
|
883
|
+
- شبكة
|
|
884
|
+
- موقع
|
|
885
|
+
- संगठन
|
|
886
|
+
- みんな
|
|
887
|
+
- グーグル
|
|
888
|
+
- 世界
|
|
889
|
+
- 中信
|
|
890
|
+
- 中文网
|
|
891
|
+
- 企业
|
|
892
|
+
- 佛山
|
|
893
|
+
- 信息
|
|
894
|
+
- 健康
|
|
895
|
+
- 八卦
|
|
896
|
+
- 公司
|
|
897
|
+
- 公益
|
|
898
|
+
- 商城
|
|
899
|
+
- 商店
|
|
900
|
+
- 商标
|
|
901
|
+
- 在线
|
|
902
|
+
- 广东
|
|
903
|
+
- 慈善
|
|
904
|
+
- 我爱你
|
|
905
|
+
- 手机
|
|
906
|
+
- 政务
|
|
907
|
+
- 政府
|
|
908
|
+
- 时尚
|
|
909
|
+
- 机构
|
|
910
|
+
- 淡马锡
|
|
911
|
+
- 游戏
|
|
912
|
+
- 移动
|
|
913
|
+
- 组织机构
|
|
914
|
+
- 网址
|
|
915
|
+
- 网店
|
|
916
|
+
- 网络
|
|
917
|
+
- 谷歌
|
|
918
|
+
- 集团
|
|
919
|
+
- 飞利浦
|
|
920
|
+
- 삼성
|
|
787
921
|
- onion
|
|
@@ -329,7 +329,7 @@ module Twitter
|
|
|
329
329
|
hash = chars[entity[:indices].first]
|
|
330
330
|
hashtag = entity[:hashtag]
|
|
331
331
|
hashtag = yield(hashtag) if block_given?
|
|
332
|
-
hashtag_class = options[:hashtag_class]
|
|
332
|
+
hashtag_class = options[:hashtag_class].to_s
|
|
333
333
|
|
|
334
334
|
if hashtag.match Twitter::Regex::REGEXEN[:rtl_chars]
|
|
335
335
|
hashtag_class += ' rtl'
|
data/lib/twitter-text/regex.rb
CHANGED
|
@@ -105,8 +105,8 @@ module Twitter
|
|
|
105
105
|
|
|
106
106
|
# A hashtag must contain at least one unicode letter or mark, as well as numbers, underscores, and select special characters.
|
|
107
107
|
HASHTAG_ALPHA = /[\p{L}\p{M}]/
|
|
108
|
-
HASHTAG_ALPHANUMERIC = /[\p{L}\p{M}\p{Nd}_\u200c\u0482\ua673\ua67e\u05be\u05f3\u05f4\u309b\u309c\u30a0\u30fb\u3003\u0f0b\u0f0c\
|
|
109
|
-
HASHTAG_BOUNDARY = /\A|\z|[^&\p{L}\p{M}\p{Nd}_\u200c\u0482\ua673\ua67e\u05be\u05f3\u05f4\u309b\u309c\u30a0\u30fb\u3003\u0f0b\u0f0c\
|
|
108
|
+
HASHTAG_ALPHANUMERIC = /[\p{L}\p{M}\p{Nd}_\u200c\u200d\u0482\ua673\ua67e\u05be\u05f3\u05f4\u309b\u309c\u30a0\u30fb\u3003\u0f0b\u0f0c\u00b7]/
|
|
109
|
+
HASHTAG_BOUNDARY = /\A|\z|[^&\p{L}\p{M}\p{Nd}_\u200c\u200d\u0482\ua673\ua67e\u05be\u05f3\u05f4\u309b\u309c\u30a0\u30fb\u3003\u0f0b\u0f0c\u00b7]/
|
|
110
110
|
|
|
111
111
|
HASHTAG = /(#{HASHTAG_BOUNDARY})(#|#)(#{HASHTAG_ALPHANUMERIC}*#{HASHTAG_ALPHA}#{HASHTAG_ALPHANUMERIC}*)/io
|
|
112
112
|
|
|
@@ -5,13 +5,17 @@ module Twitter
|
|
|
5
5
|
chars = text.to_s.to_char_a
|
|
6
6
|
|
|
7
7
|
# sort by start index
|
|
8
|
-
entities = entities.sort_by
|
|
8
|
+
entities = entities.sort_by do |entity|
|
|
9
|
+
indices = entity.respond_to?(:indices) ? entity.indices : entity[:indices]
|
|
10
|
+
indices.first
|
|
11
|
+
end
|
|
9
12
|
|
|
10
13
|
result = []
|
|
11
14
|
last_index = entities.inject(0) do |index, entity|
|
|
12
|
-
|
|
15
|
+
indices = entity.respond_to?(:indices) ? entity.indices : entity[:indices]
|
|
16
|
+
result << chars[index...indices.first]
|
|
13
17
|
result << yield(entity, chars)
|
|
14
|
-
|
|
18
|
+
indices.last
|
|
15
19
|
end
|
|
16
20
|
result << chars[last_index..-1]
|
|
17
21
|
|
data/twitter-text.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = "twitter-text"
|
|
5
|
-
s.version = "1.
|
|
5
|
+
s.version = "1.12.0"
|
|
6
6
|
s.authors = ["Matt Sanford", "Patrick Ewing", "Ben Cherry", "Britt Selvitelle",
|
|
7
7
|
"Raffi Krikorian", "J.P. Cummins", "Yoshimasa Niwa", "Keita Fujii", "James Koval"]
|
|
8
8
|
s.email = ["matt@twitter.com", "patrick.henry.ewing@gmail.com", "bcherry@gmail.com", "bs@brittspace.com",
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twitter-text
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.12.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matt Sanford
|
|
@@ -16,7 +16,7 @@ authors:
|
|
|
16
16
|
autorequire:
|
|
17
17
|
bindir: bin
|
|
18
18
|
cert_chain: []
|
|
19
|
-
date: 2015-
|
|
19
|
+
date: 2015-04-30 00:00:00.000000000 Z
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
22
22
|
name: multi_json
|
|
@@ -184,7 +184,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
184
184
|
version: '0'
|
|
185
185
|
requirements: []
|
|
186
186
|
rubyforge_project:
|
|
187
|
-
rubygems_version: 2.4.
|
|
187
|
+
rubygems_version: 2.4.6
|
|
188
188
|
signing_key:
|
|
189
189
|
specification_version: 4
|
|
190
190
|
summary: Twitter text handling library
|