Fix class detection

Split style attributes on any combination of whitespace rather than
just on single space characters.

This allows class attributes which have newlines and other whitespace
in them for markup formatting purposes.