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

Land previously failing block-indentation tests for lines starting with   #184

Merged
merged 1 commit into from
Nov 3, 2019

Conversation

reidab
Copy link
Contributor

@reidab reidab commented Feb 27, 2017

For #120:

  •   followed by text ( Hello) seems to interpret the   as a space and fails: Expected '  Hello\n' to be at an indentation of 2 but was found at 3."
  • &nbsp; followed by HTML (&nbsp;<div></div>) seems to interpret the &nbsp; as six separate whitespace characters and fails: Expected '<div>' to be at an indentation of 2 but was found at 8.

@rwjblue
Copy link
Member

rwjblue commented Feb 27, 2017

Oh, no. This is tricky indeed...

bjornharrtell pushed a commit to bjornharrtell/ember-template-lint that referenced this pull request Jun 11, 2019
* chore(package): Bump to [email protected]

* chore(package): Bump to [email protected]

* chore(package): Bump to [email protected]
…emplate-lint#120)

- `&nbsp;` followed by text (`&nbsp;Hello`) seems to interpret the `&nbsp;` as a space and fails: `Expected '   Hello\n' to be at an indentation of 2 but was found at 3."`
- `&nbsp;` followed by HTML (`&nbsp;<div></div>`) seems to interpret the `&nbsp;` as six separate whitespace characters and fails: `Expected '<div>' to be at an indentation of 2 but was found at 8.`
Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is finally passing. Sorry for the massive delays, many yaks have been shaved along the way....

@rwjblue rwjblue merged commit daac267 into ember-template-lint:master Nov 3, 2019
@rwjblue rwjblue changed the title Add failing indentation tests for lines starting with &nbsp; Land previously failing block-indentation tests for lines starting with &nbsp; Nov 3, 2019
@MelSumner
Copy link
Contributor

@rwjblue folks shouldn't be indenting paragraph text with whitespace, they should be using CSS (attach a class to the element and put padding in it). It's the whole point of the rule.

@rwjblue
Copy link
Member

rwjblue commented Nov 4, 2019

@MelSumner - That is definitely not the point of the block-indentation rule 😉, it may be the point of the other rule you recently worked on (no-whitespace-for-layout landed in #819) but I actually don't think it is. Using spaces in a template to format them so that they can be read by a human is a perfectly valid thing to do. Either way, it is important to keep in mind that each rule should work independently and that any number of combinations of rules will be used together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants