pugjs / pug-error

Standard error objects for pug
MIT License
1 stars 3 forks source link

Add a marker for column as well as line #6

Closed TimothyGu closed 9 years ago

TimothyGu commented 9 years ago

Sample output:

    1| hey
  > 2| blah
---------^
    3| asdf

After #5 is merged:

Error: my.jade:2:3: mesg
    1| hey
  > 2| blah
---------^
    3| asdf

    at makeError (/home/timothy_gu/jade-error/index.js:30:13)
    at repl:1:19
    at REPLServer.defaultEval (repl.js:248:27)
    at bound (domain.js:280:14)
    at REPLServer.runBound [as eval] (domain.js:293:12)
    at REPLServer.<anonymous> (repl.js:412:12)
    at emitOne (events.js:82:20)
    at REPLServer.emit (events.js:169:7)
    at REPLServer.Interface._onLine (readline.js:210:10)
    at REPLServer.Interface._line (readline.js:549:8)

Consistent with stylus'.

ForbesLindesay commented 9 years ago

Could you add a test to cover this, then feel free to merge :+1:

TimothyGu commented 9 years ago

Test added, and merged.