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

'check css' isn't showing the information associated with Parse Errors #484

Closed
dgmstuart opened this Issue Oct 10, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@dgmstuart
Copy link

commented Oct 10, 2014

When running nanoc check css on https://github.com/dgmstuart/dgms_cv I get the following mystery errors:

Issues found!
  output/stylesheets/styles.css:
    [ ERROR ] css - Parse Error
    [ ERROR ] css - Parse Error

Running my output css through the W3C CSS validator site I can see the source of the problem (apparently the validator currently chokes on the @page selector - used in print stylesheets):

Parse Error @page { margin: 1.2cm; }
Parse Error }

It would be nice if nanoc could display this information as well.

@ddfreyne

This comment has been minimized.

Copy link
Member

commented Dec 6, 2014

The w3c_validators gem doesn’t return that data in a ready-to-use format, but it does return the lines on which the error occurred, so that should give enough information (hopefully) to create a better error message:

#<W3CValidators::Results:0x007fbe950506f8
  @messages=[
    #<W3CValidators::Message:0x007fbe95058da8
    @type=:error,
    @uri="file://localhost/TextArea",
    @line="1",
    @col=nil,
    @source=nil,
    @explanation=nil,
    @message="\n        \n                                Parse Error\n                            ",
    @message_id=nil,
    @message_count=nil,
    @element=nil,
    @parent=nil,
    @value=nil,
    @level=nil>],
  @uri="file://localhost/TextArea",
  @checked_by="http://jigsaw.w3.org/css-validator/",
  @doctype=nil,
  @css_level="css3",
  @charset=nil,
  @validity=false,
  @debug_messages={}
>
@ddfreyne

This comment has been minimized.

Copy link
Member

commented Jan 10, 2015

Fixed by #504. This will be in the next patch release (3.7.5)!

@ddfreyne ddfreyne closed this Jan 10, 2015

@dgmstuart

This comment has been minimized.

Copy link
Author

commented Jan 10, 2015

Great :)

ddfreyne added a commit that referenced this issue Jan 11, 2015

ddfreyne added a commit that referenced this issue Jan 11, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.