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

Log code snippet next to syntax errors #58

Open
mbostock opened this issue Oct 23, 2023 · 2 comments
Open

Log code snippet next to syntax errors #58

mbostock opened this issue Oct 23, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mbostock
Copy link
Member

When the preview server encounters a syntax error, it logs the message to the console:

SyntaxError: Assignment to external variable 'x' at line 4, column 1

It would be nicer if this message included the file with the syntax error, and a snippet of code to point to the error in context.

@mbostock mbostock added enhancement New feature or request good first issue Good for newcomers labels Oct 23, 2023
@mootari
Copy link
Member

mootari commented Oct 24, 2023

Does this issue depend on #7 ?

@mbostock mbostock added this to the General availability milestone Nov 13, 2023
@mbostock mbostock changed the title Show code snippet next to syntax errors Log code snippet next to syntax errors Jan 16, 2024
@mbostock mbostock modified the milestones: General availability, Future Jan 23, 2024
@mbostock mbostock removed this from the Future milestone Mar 24, 2024
@borango
Copy link

borango commented Apr 12, 2024

it would help me already if I had a sourcefile where I can lookup 'line 4, column 1'.

The line number does not relate to my .md source file. It rather seems to be relative to a fenced code block. So the line number relative to my .md source would be most helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants