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

check (-c) does not work as expected #880

Closed
kidbrax opened this Issue Aug 8, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@kidbrax

kidbrax commented Aug 8, 2016

I check a file and it says syntax is ok, but then I try to actually convert the file and it fails with syntax errors.

~/code/rentlogic/marketing-site $ haml -c src/index.haml 
Syntax OK
~/code/rentlogic/marketing-site $ haml src/index.haml compiled/index.html
Syntax error on line 131: src/index.haml:7: syntax error, unexpected tIDENTIFIER, expecting ')'
...{}, nil, rel: 'stylesheet' href: 'https://maxcdn.bootstrapcd...
...                               ^
src/index.haml:7: syntax error, unexpected ')', expecting tSTRING_DEND
...p/3.3.7/css/bootstrap.min.css')}>\n    <link#{
...                               ^
src/index.haml:11: syntax error, unexpected tSTRING_DEND, expecting '}'
_hamlout.attributes({}, nil, rel:'stylesheet' href:...
                      ^
src/index.haml:11: Can't assign to nil
_hamlout.attributes({}, nil, rel:'stylesheet' href: 'http...
                            ^
src/index.haml:11: syntax error, unexpected tIDENTIFIER, expecting tSTRING_DEND
...({}, nil, rel:'stylesheet' href: 'https://maxcdn.bootstrapcd...
...                               ^
src/index.haml:11: syntax error, unexpected ')', expecting tSTRING_DEND
...7/css/bootstrap-theme.min.css')}>\n    <script#{
...                               ^
src/index.haml:15: syntax error, unexpected '}', expecting tSTRING_DEND
...ap/3.3.7/js/bootstrap.min.js')}></script>\n  </head>\n  <bod...
...                               ^
src/index.haml:15: unknown regexp options - had
src/index.haml:15: syntax error, unexpected $undefined
...min.js')}></script>\n  </head>\n  <body>\n    <h1>Why should...
...                               ^
src/index.haml:15: syntax error, unexpected $undefined
...</script>\n  </head>\n  <body>\n    <h1>Why should I use HAM...
...                               ^
src/index.haml:15: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
...>\n  <body>\n    <h1>Why should I use HAML?</h1>\n    <ol>\n...
...                               ^
src/index.haml:15: unknown regexp option - l
src/index.haml:15: syntax error, unexpected $undefined
... much easier on the eyes.</li>\n      <li>You'll type less.<...
...                               ^
src/index.haml:15: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
... the eyes.</li>\n      <li>You'll type less.</li>\n      <li...
...                               ^
src/index.haml:15: unterminated string meets end of file
  Use --trace for backtrace.
~/code/rentlogic/marketing-site $

@k0kubun k0kubun closed this in 83da985 May 3, 2017

@k0kubun

This comment has been minimized.

Show comment
Hide comment
@k0kubun

k0kubun May 3, 2017

Member

Fixed on master branch. Please wait for next release.

Member

k0kubun commented May 3, 2017

Fixed on master branch. Please wait for next release.

netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Sep 10, 2017

taca
Update ruby-haml to 5.0.3.
## 5.0.3

Released on September 7, 2017
([diff](haml/haml@v5.0.2...v5.0.3)).

* Use `String#dump` instead of `String#inspect` to generate string
  literal. (Takashi Kokubun)
* Fix Erubi superclass mismatch
  error. [#952](haml/haml#952) (thanks [Robin
  Daugherty](https://github.com/RobinDaugherty))

## 5.0.2

Released on August 1, 2017
([diff](haml/haml@v5.0.1...v5.0.2)).

* Let `haml -c` fail if generated Ruby code is syntax
  error. [#880](haml/haml#880) (Takashi Kokubun)
* Fix `NoMethodError` bug caused with Sprockets 3 and :sass
  filter. [#930](haml/haml#930) (thanks [Gonzalez
  Maximiliano](https://github.com/emaxi))
* Fix `list_of` helper with multi-line
  content. [#933](haml/haml#933) (thanks [Benoit
  Larroque](https://github.com/zetaben))
* Optimize rendering performance by changing timing to fix
  textareas. [#941](haml/haml#941) (Takashi Kokubun)
* Fix `TypeError` with empty :ruby
  filter. [#942](haml/haml#942) (Takashi Kokubun)
* Fix inconsistent attribute sort order. (Takashi Kokubun)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment