Skip to content

🐛 FIX: Source line reporting for nested parsing#490

Merged
chrisjsewell merged 1 commit intomasterfrom
fix-nested-lineno
Jan 4, 2022
Merged

🐛 FIX: Source line reporting for nested parsing#490
chrisjsewell merged 1 commit intomasterfrom
fix-nested-lineno

Conversation

@chrisjsewell
Copy link
Copy Markdown
Member

Previously, nested parsing of content within directives
would not correctly propagate the starting line number
of the content.

For example:

Paragraph

```{note}
:class: abc
:name: xyz

{unknown}`a`
```

Would incorrectly report the error on line 1:

<string>:1: (ERROR/3) Unknown interpreted text role "unknown".

but now correctly reports on line 7:

<string>:7: (ERROR/3) Unknown interpreted text role "unknown".

Previously, nested parsing of content within directives
would not correctly propagate the starting line number
of the content.
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 4, 2022

Codecov Report

Merging #490 (06e409d) into master (0f2902a) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #490      +/-   ##
==========================================
+ Coverage   89.86%   89.89%   +0.02%     
==========================================
  Files          16       16              
  Lines        2062     2068       +6     
==========================================
+ Hits         1853     1859       +6     
  Misses        209      209              
Flag Coverage Δ
pytests 89.89% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
myst_parser/docutils_renderer.py 91.66% <100.00%> (+0.03%) ⬆️
myst_parser/mocking.py 86.59% <100.00%> (ø)
myst_parser/parse_directives.py 87.64% <100.00%> (+0.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0f2902a...06e409d. Read the comment docs.

@chrisjsewell chrisjsewell merged commit 79f3b4a into master Jan 4, 2022
@chrisjsewell chrisjsewell deleted the fix-nested-lineno branch January 4, 2022 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant