fix indentation problems with script endTag
eat space before inline haml content
cleanup
put blank line before javascript content to neaten indent

a hack, but ok