better handling of leading whitespace in markup