Git Product home page Git Product logo

Comments (6)

sds avatar sds commented on July 21, 2024

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.

anselmbradford avatar anselmbradford commented on July 21, 2024

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.

sds avatar sds commented on July 21, 2024

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.

monfresh avatar monfresh commented on July 21, 2024

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.

sds avatar sds commented on July 21, 2024

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.

anselmbradford avatar anselmbradford commented on July 21, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.