This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10468 - Returned line number may target end of problematic definition
Summary: Returned line number may target end of problematic definition
Status: NEW
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: Parser (show other bugs)
Version: CSS Validator
Hardware: PC Linux
: P2 enhancement
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-27 14:28 UTC by fd
Modified: 2010-08-27 14:28 UTC (History)
0 users

See Also:


Attachments

Description fd 2010-08-27 14:28:51 UTC
While not technically speaking a bug, this can be confusing, see example 1 below.

Line numbers should rather represent the position where the problem starts, not the position where the problem ends. Given that the message returned with the position includes the portion that triggers the error, it should be relatively easy to return the starting position.

Example 1: checking
@unknown {
 p {
  font-size: 2em;
 }
}
... returns "5 Parse Error @unknown { p { font-size: 2em; } }", pointing out that the problem occurs at line 5. I'd expect 1.


Example 2: checking
p {
 unknown:
  10em;
}
... returns "3 p Property unknown doesn't exist", pointing out that the problem occurs on line 3. I'd expect 2.