Or at least it does on Beta Labs.
Compare the results of a call to API action=parse with and without the disabletidy option:
{ "parse": { "title": "API", "pageid": 0, "text": { "*": "<div class=\"mw-parser-output\"><p><style>.mw-parser-output .foo{color:red}</style>\n</p></div>" } } }
{ "parse": { "title": "API", "pageid": 0, "text": { "*": "<div class=\"mw-parser-output\">\n</div>" } } }