-
Notifications
You must be signed in to change notification settings - Fork 12
Source ranges #339
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
Source ranges #339
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #339 +/- ##
==========================================
+ Coverage 79.43% 80.10% +0.67%
==========================================
Files 39 39
Lines 2071 2106 +35
==========================================
+ Hits 1645 1687 +42
+ Misses 426 419 -7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one changed requested to avoid accessing a field and rather using first()
instead.
I wasn't sure at first if there could be empty ranges (for which first would error) but I think that can't happen even in the weird cases that quarto inserts |
This PR is the QNR side of fixing #310, the corresponding PR in quarto-cli is quarto-dev/quarto-cli#13401. This PR will have to be merged and tagged first before the quarto PR can pass final CI and be merged as well. The change is backwards compatible in that if no source ranges are supplied, the original file's line numbers are used like before.
The effect of this is that evaluated Julia cells get the correct file paths and line numbers so that code in includes can be correctly traced back. For example something like this (plus includes that also print file and line)
gives something like this