Retire the post-render doctest fixes - #320
Merged
Merged
Conversation
Doctest prompts are now fenced as Python before the docstring is parsed, so Pandoc never reads a leading `>` as a blockquote marker. The HTML pass that rebuilt those blockquotes into a code block had nothing left to repair; removing it leaves the rendered reference pages byte-identical. Add a render-level test that no doctest prompt reaches the qmd outside a code fence, covering prompts inside an Examples section and loose in the subject, consecutive prompt groups, a Google-style header under the numpy parser, and a class with its members.
Doctest prompts are fenced as Python before the docstring is parsed, so Quarto highlights every doctest block itself and never leaves one as an unhighlighted code block. The HTML pass that re-highlighted those blocks had no matching input; removing it leaves the rendered reference pages byte-identical under the numpy, google and sphinx parsers. Drop its tests, along with the Pygments namespace scaffolding that only those tests needed. Widen the fence test to the shapes that motivated the pass: a literal block, an indented group pair, a list item, and docstrings written in Google and Sphinx style under their own parsers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes the two HTML passes that repaired doctest blocks after Quarto rendered them.
Ref: PR #284