Skip to content

Fix mixed indents in block strings #77

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

janedbal
Copy link

  • bug fix
  • BC break? no

  • When using custom indents (spaces) and block mode, inner part of block strings were always indented with tab.
  • This showed up in our git-based whitespace check in pre-commit (git diff-index --check --cached HEAD -- $FILES) as space before tab in indent error.
  • The real usecase is PHPStan baseline of deprecated usages where newline is very often.

Before:

inner:
    msg: '''
    	string
    	with newline
    '''

After this fix:

inner:
    msg: '''
        string
        with newline
    '''

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.

1 participant