Docstrings highlighting with pygments by nastasi-oq · Pull Request #5462 · encode/django-rest-framework (original) (raw)
@carltongibson What do you think?
To be clear on what I'm talking about, this PR uses a format that is not used in any other markup system that I can find. Specifically, to mark a code block with this PR you do something like:
@@ json @@
['some json here']
@@
This '@@' markup is what I'm talking about.
Here on github and lots of other places you use triple backticks to markup code blocks. Of course, I don't think the Markdown "standard" (such as it is) has any method of marking code blocks, but I think triple backticks are widely-supported.
I propose code blocks be marked like:
```json
['some json here']
\```
(that extra backslash is just so I can fool githubs markdown parsing to let me put triple backticks inside a code block marked out by triple backticks)