Skip to content

Instantly share code, notes, and snippets.

@tonyfast
Last active October 26, 2022 08:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonyfast/cfb55f41f5452ef33ec6fbb4e0bda991 to your computer and use it in GitHub Desktop.
Save tonyfast/cfb55f41f5452ef33ec6fbb4e0bda991 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tony
Copy link

tony commented Jul 17, 2022

@tonyfast Did anything more come of this? This could come in quite handy to a lot of folks

I found a project at https://github.com/thisch/pytest-sphinx and in the early phases of porting it over to docutils / myst API (from simple regex): https://github.com/thisch/pytest-sphinx/pull/31/files

P.S. I also posted to executablebooks/MyST-Parser#601 and Erotemic/xdoctest#68

@tonyfast
Copy link
Author

the current implementation i'd suggest is in my pidgy project. i think it will work generically. this doctest rule is closer the markdown-it-py conventions. feel free to borrow the implementation where ever you see fit. ping me if you have any tools you want tested out.

🤞 hopefully there is an implementation that can stay about the docutils layer.

@cjw296
Copy link

cjw296 commented Oct 26, 2022

Stumbled into this trying to find out what the MyST syntax was for class "Python REPL" style that doctests uses, not sure if the above answers my question, but I'm in the process of adding MyST support to Sybil, which may be of interest...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment