dryan/twitter-text-py — pull request #17 by dryan (2013-05-16 00:31:31+00:00)
Title: Upgrade to 2.0

This is a near complete code refactor to bring the module back into conformance with the canonical ruby gem.

- [x] All regular expressions updated to match ruby gem
- [x] Additional methods added to validation module
- [x] Rewrite of Extractor to match ruby gem
- [x] Changing how HitHighlighter.hit_highlight works to match ruby gem (see note below)
- [x] Addresses issues #13, #14, #15 and #16

The ruby gem changed how HitHighlighter.hit_highlight works. The `query` parameter from v1.x must now be passed as a named argument and not a positional argument. The positional argument is now an array of arrays of indices indicating where to place the highlight tags, ie `[[0,4]]`. These indices are based on the text with all HTML tags stripped. Additionally, the option for customizing what HTML tag to use as the highlight has changed to `tag`.

Tests for Validation are skipped on narrow builds of python (which includes the system and homebrew-installed versions on OS X), though the validation methods will work on these systems.

Parsing extended Kanji characters on [narrow build systems](http://www.python.org/dev/peps/pep-0261/) works in all tests, but my fail in some cases. Usage of this module for work with extended unicode characters is only recommended on wide builds of python.