Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove trailing blank lines from HAML's :code filter #79

Merged
merged 1 commit into from
Aug 6, 2022

Conversation

MaxLap
Copy link
Contributor

@MaxLap MaxLap commented Nov 28, 2020

Without this change, every blank lines until other content in the haml file will be sent to the :code filter, which leads to empty lines in the code block:

Hello world
555

:code
  # lang: ruby
  def hello
    puts 'hi'
  end



BYe

image

This is even done in the :javascript filter, which wouldn't care about those: https://github.com/haml/haml/blob/000b6657b5a9fbc18e64ba75edfd2a2a2c8e8bc2/lib/haml/filters.rb#L220

This avoids the bloc of code being showing extra blank lines at the end
@tdreyno tdreyno merged commit 3295894 into middleman:master Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants