bradchoate/text-textile — pull request #9 by serap (2014-04-18 14:47:36+00:00)
Title: improve whitespace handling in image processing

Hi Brad,

thank you for your work on Text::Textile.

We love your module and impressed by your regex skills. However we feel that we found a bug in the image parsing part.

Please check an hopefully apply the patch if you agree with my version.

NB: I have not checked other tags for the same issue ...

Best regards and Happy Easter!
Serap

prevent images parser from interpreting ! noimage ! as image tag

(?:(?<=[^\!])\s+)?

optionally match one or more spaces that must not be preceeded by an
exclamation mark. if any of the optional alignment or css options are
used a space is acceptable otherwise not.