Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update conformance for validation, extraction and autolinking of Russ…

…ian and Korean hashtags
  • Loading branch information...
commit 3aca14da721e60b855e5c4b1a7a04707071ade82 1 parent 35b1d8e
Matt Sanford authored
Showing with 30 additions and 1 deletion.
  1. +6 −1 README
  2. +8 −0 autolink.yml
  3. +8 −0 extract.yml
  4. +8 −0 validate.yml
View
7 README
@@ -29,7 +29,7 @@ If you are creating a new twitter-text library in a different programming langua
3. Only expose the public API method and not the underlying regular expressions
3.a. If your language or environment does not allow for this please make a comment to the effect
- 3.b. This prevent breakage when regular expressions need to change in fundamental ways
+ 3.b. This prevents breakage when regular expressions need to change in fundamental ways
== Submitting new conformance tests
@@ -41,6 +41,11 @@ If you are creating a new twitter-text library in a different programming langua
== Changelog
+ * v1.4.0 - 2011-05-18 [ Git tag v1.4.0 ]
+ * [FIX] Add support for Russian hashtags
+ * [FIX] Add support for Korean hashtags
+ * [DOC] Update README and License
+
* v1.3.1 - 2010-12-03 - [ Git tag v1.3.1 ]
* [DOC] Updated README with Changelog section
* [FIX] Autolink URLs with paths ending in + and -
View
8 autolink.yml
@@ -64,6 +64,7 @@ tests:
- description: "Autolink usernames that are followed by international characters"
text: "@foo îs in the house"
expected: "@<a class=\"tweet-url username\" href=\"http://twitter.com/foo\">foo</a> îs in the house"
+
lists:
- description: "Autolink list preceded by a space"
text: "text @username/list"
@@ -182,6 +183,13 @@ tests:
text: "#hashétag"
expected: "<a href=\"http://twitter.com/search?q=%23hashétag\" title=\"#hashétag\" class=\"tweet-url hashtag\">#hashétag</a>"
+ - description: "Autolink hashtags in Korean"
+ text: "What is #트위터 anyway?"
+ expected: "What is <a href=\"http://twitter.com/search?q=%23트위터\" title=\"#트위터\" class=\"tweet-url hashtag\">#트위터</a> anyway?"
+
+ - description: "Autolink hashtags in Russian"
+ text: "What is #ашок anyway?"
+ expected: "What is <a href=\"http://twitter.com/search?q=%23ашок\" title=\"#ашок\" class=\"tweet-url hashtag\">#ашок</a> anyway?"
urls:
- description: "Autolink URL with pipe character"
View
8 extract.yml
@@ -324,6 +324,14 @@ tests:
text: "this is not valid: # 会議中 ハッシュ"
expected: []
+ - description: "Extract a hashtag in Korean"
+ text: "What is #트위터 anyway?"
+ expected: ["트위터"]
+
+ - description: "Extract a hashtag in Russian"
+ text: "What is #ашок anyway?"
+ expected: ["ашок"]
+
hashtags_with_indices:
- description: "Extract a hastag at the start"
text: "#hashtag here"
View
8 validate.yml
@@ -84,6 +84,14 @@ tests:
text: "#12345"
expected: false
+ - description: "Valid hashtag: Russian text"
+ text: "#ашок"
+ expected: true
+
+ - description: "Valid hashtag: Korean text"
+ text: "#트위터"
+ expected: true
+
urls:
- description: "Valid url: protocol + domain"
text: "http://example.com"
Please sign in to comment.
Something went wrong with that request. Please try again.