yari icon indicating copy to clipboard operation
yari copied to clipboard

fix(kumascript): improve MacroInvocationError display

Open caugner opened this issue 3 years ago • 1 comments

Summary

Fixes #7106 by improving the way MacroInvocationErrors are displayed (both in the command line and in the browser).

Problem

Macro errors were always confusing and hard to locate, because the shown line number did not correspond to the Markdown file.

Solution

Remove the line numbers in favor of showing the source context (+/- 2 lines).


Screenshots

Before

image

After

image

How did you test this change?

Opened http://localhost:3000/en-US/docs/MDN/Kitchensink locally and introduced a syntax error in my local mdn/content checkout by removing the second " in this line:

https://github.com/mdn/content/blob/6fdcfb2bb5862d89d84cc511cf31a0e4fffc72bf/files/en-us/mdn/kitchensink/index.md?plain=1#L300

caugner avatar Sep 12 '22 14:09 caugner

This pull request has merge conflicts that must be resolved before it can be merged.

github-actions[bot] avatar Sep 15 '22 13:09 github-actions[bot]