chronic icon indicating copy to clipboard operation
chronic copied to clipboard

Stop Token#to_s from modifying word attribute

Open mieko opened this issue 13 years ago • 0 comments

I wrote a scanner on top of chronic, using its tagger, and this was pretty strange. Token#to_s is elongating its word attribute every time I display it, making it hard to query tokens if they've been tagged.

First commit fixes this bug and includes a testcase. Second commit alters similar mutable-to_s cases throughout the Tag hierarchy to avoid this situation in the future.

mieko avatar May 16 '11 10:05 mieko