New definition of scanNonidentSpace using scan.

Also refactored a bit to avoid reparsing nonindent spaces.
Preserve blanks at end of line in HTML blocks.