Comments (6)
Hey @anselmbradford, sorry for the delay in response.
You example works just fine for me—I don't get any syntax errors. You should be able to indent as many characters as you want, so the "good" example works as-is.
Which version of haml
and haml-lint
are you running?
from haml-lint.
Hey @sds haml 4.0.5
and haml-lint 0.8.0
. This is the example file I showed that won't accept three spaces for line subsequent to the first. Do you see anything else that would cause an issue there? Thanks!
from haml-lint.
Hey @anselmbradford,
That file parses just fine for me, both with haml-lint
as well as haml
itself (when I replace email
with a literal string so haml
can actually run it).
I'm not sure what other advice I can offer here--it seems like there's something about your system that is causing this issue. Can you get others to reproduce? What OS and Ruby version are you running?
from haml-lint.
Hi @sds. What Ans is referring to is that in a HAML document, indentation must be consistent. The file he linked to already has consistent indentation, so it will parse fine. To reproduce the issue, you will need to add an extra space on line 2.
The problem is that most people will probably use 2 spaces of indentation within a document, and if they follow your comment example that uses 3 spaces of indentation, the parsing will break because of inconsistent indentation.
from haml-lint.
Thanks for the clarification @monfresh.
My mistake—the documentation is clearly incorrect in this case. I've updated it to the following example:
-#
This is a comment
spread over multiple lines that reads cleanly
from haml-lint.
@sds FYI, I haven't double-checked, but I believe haml-lint may complain if there isn't a trailing space after -#
, which may not be apparent in the updated example.
from haml-lint.
Related Issues (20)
- Multiline pipes in JS files cause RuboCop to report "unexpected token tRCURLY"
- Haml-lint is running rubocop to lint JavaScript regex HOT 1
- False positive Rails/HttpStatus HOT 2
- Failing spec on main branch HOT 2
- Add support to Haml 6.2
- `haml-lint:disable` is ignored when line breaks on commas are present
- Add `-s`/`--stdin` option support HOT 2
- Allow Haml 6.3 HOT 3
- Haml 6.2 actions are not listed among required checks HOT 1
- Failing spec on main (local environment, up to date rubocop)
- Issue with Rubocop `Layout/IndentationConsistency` interaction with haml comment blocks HOT 2
- Version 0.53.0 has not been pushed to Rubygems HOT 1
- RuboCop: Lint/Syntax: unexpected token tSYMBOL and kEND HOT 5
- 0.54.0: Too many files open HOT 4
- Layout/ArgumentAlignment - False positive? HOT 2
- Feature Suggestion: require strict locals
- Possible false positives with Rails/FindEach
- Lint/Syntax: unexpected token kDO_BLOCK | Lint/Syntax: unexpected token kEND HOT 1
- False positive with Layout/SpaceInsideParens for multi-line attributes HOT 7
- Allow multiple reporters?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haml-lint.