diff --git a/lib/TwitterText.m b/lib/TwitterText.m index baca305..4f8867a 100644 --- a/lib/TwitterText.m +++ b/lib/TwitterText.m @@ -53,6 +53,16 @@ // // Hashtag // +#define TWUMiddleDot @"\\u00B7" +#define TWUBullet @"\\u2022" +#define TWUKatakanaMiddleDot @"\\u30FB" +#define TWUHalfwidthKatakanaMiddleDot @"\\uff65" + +#define TWUSpecialCharsIncluded \ + TWUMiddleDot \ + TWUBullet \ + TWUKatakanaMiddleDot \ + TWUHalfwidthKatakanaMiddleDot #define TWUCyrillicHashtagChars @"\\u0400-\\u04FF" #define TWUCyrillicSupplementHashtagChars @"\\u0500-\\u0527" @@ -137,6 +147,7 @@ TWULatinAccents \ TWUNonLatinHashtagChars \ TWUCJKHashtagCharacters \ + TWUSpecialCharsIncluded \ @"]" #define TWUHashtagBoundaryInvalidChars \ diff --git a/test/json-conformance/extract.json b/test/json-conformance/extract.json index d90394b..4df0b30 100644 --- a/test/json-conformance/extract.json +++ b/test/json-conformance/extract.json @@ -1167,6 +1167,13 @@ } ], "hashtags": [ + { + "description": "Extract mid-dot hashtag", + "text": "a #ビ·ル•ゲ・イ・ツ", + "expected": [ + "ビ·ル•ゲ・イ・ツ" + ] + }, { "description": "Extract an all-alpha hashtag", "text": "a #hashtag here", diff --git a/test/twitter-text-conformance b/test/twitter-text-conformance index be88d01..34b2fd8 160000 --- a/test/twitter-text-conformance +++ b/test/twitter-text-conformance @@ -1 +1 @@ -Subproject commit be88d01a567c82bc625f8991cd825dc100e01321 +Subproject commit 34b2fd833cca52aedcf08e03fa60c4210facfd32