-
Notifications
You must be signed in to change notification settings - Fork 86
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
Fix line number / cell index reporting #71
Comments
Could we pass in the cell number into the state machine somehow? I feel like cell numbers are more helpful to report here than line numbers |
Well ideally you'd report both. Its just thinking of a way to do this that ideally still keeps Note the cell index is now stored in the markdown AST, which was the first step: https://github.com/ExecutableBookProject/MyST-NB/blob/4c3f36b884086878dc0af5dfcfd735b98ebbbacf/myst_nb/parser.py#L94 |
Report line number as <cell index>*10000 + <line number>. This is a simple solution to addresses #71, that doesn't require any complex overrides of the sphinx reporting machinery.
This commit move to markdown-it-py markdown parser implementation, concurrently with myst-parser. Additionally: - Add notebook render tests - Add simple solution for reporting correct cell index/line number: Report line number as <cell index>*10000 + <line number>. This is a simple solution to addresses #71, that doesn't require any complex overrides of the sphinx reporting machinery. - Make tests use the actual sphinx Application - Re-write validation of which docs to execute/cache: Rather than having a global variable, we save the exclude paths in the sphinx env and use a seperate function `is_valid_exec_file`. Also added tests
…s#107) This commit move to markdown-it-py markdown parser implementation, concurrently with myst-parser. Additionally: - Add notebook render tests - Add simple solution for reporting correct cell index/line number: Report line number as <cell index>*10000 + <line number>. This is a simple solution to addresses executablebooks#71, that doesn't require any complex overrides of the sphinx reporting machinery. - Make tests use the actual sphinx Application - Re-write validation of which docs to execute/cache: Rather than having a global variable, we save the exclude paths in the sphinx env and use a seperate function `is_valid_exec_file`. Also added tests
So that sphinx will report errors/warnings referring to correct place in the notebook
The text was updated successfully, but these errors were encountered: