jmcnevin / rubypants

RubyPants: SmartyPants for Ruby
Other
29 stars 20 forks source link

Test ellipses with more whitespace characters #23

Closed ashmaroli closed 6 years ago

ashmaroli commented 6 years ago

Honestly, I did not expect these cases to pass..

agriffis commented 6 years ago

Yeah, that seems like a mistake. Good catch. I think [:space:] intended to match only space or tab (and frankly, even tab is a stretch to assume the author intended an ellipse in that case). The proper character class is [:blank:] for space and tab.

However I'd be in favor of just matching proper space instead. What do you think?

ashmaroli commented 6 years ago

However I'd be in favor of just matching proper space instead.

I agree. Supporting just ... and . . . seems legit enough. I can submit a PR using an elementary regex (using / / instead of /[[:blank:]]/)