-
-
Notifications
You must be signed in to change notification settings - Fork 776
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Improve Mark display on compact mode #332
Conversation
Could you explain reasons for this PR? |
The reason behind this change is cosmetic. I have built a tool to format YAML files and errors are handled this way: try {
data = yaml.load(contents)
} catch (e) {
const line = e.mark.line + 1
const column = e.mark.column + 1
console.error(`${e.name}: ${e.reason} (${line}:${column})\n`)
console.error(codeFrame(contents, line, column))
process.exit(1)
} The goal is to be able to switch to compact mode to prevent the code frame from being displayed but keeping the mark concise:
Modifying |
Let's keep this open, to revisit on major version bump. |
Fixed in a58d8bc (together with stylus-like exception formatting). |
Before:
After: