When checking whether a line is Ruby multiline use the parse value rather than the whole line, which may include extraneous trailing whitespace. Fixes #830
* set sudo: false so Travis can use their new container-based infrastructure * enable bundler caching * set language: ruby for good measure
Use Bundler.with_clean_env for cleaner behaviour when performing actions for different test Gemfiles, mainly installing dependencies. Previously, running e.g. `bundle exec rake test:rc` could resuly in errors as the parent Bundler environment was fully removed.
Before this commit, haml_tag relied on haml_concat to write its output. This created a problem when XSS protection was in use - the tags themselves needed not to be escaped, but the tags contents should be escaped. The current workaround used the with_raw_haml_concat method to set a flag to control whether haml_concat should be escaped, but this is too crude and results in any use of haml_concat inside a block passed to haml_tag not being escaped when it should. Create new private methods in Helpers to allow more control of writing to the buffer, and change haml_tag to use them so that haml_tag and haml_concat behave correctly when XSS protection is in use. Also alter haml_concat_with_haml_xss so it still respects with_raw_haml_concat. See #718, #731, #732
When interpolating single line comments, use the nuke_inner_whitespace option to prevent format_script from decrementing the @real_tabs variable in the buffer, which can result in issues later in the Haml. This is admittedly a bit of a hack, cased by the number of params for format_script and the number of routes through that method. Other parts of the compiler explicitly emit code to add the extra tab to take this into account, which is arguably worse.