added strictWhitespace option (lenient by default)