Skip to content

Instantly share code, notes, and snippets.

@jfriedly
Last active December 15, 2015 08:19
Show Gist options
  • Save jfriedly/5229929 to your computer and use it in GitHub Desktop.
Save jfriedly/5229929 to your computer and use it in GitHub Desktop.
Testing Github-flavored Markdown / reStructuredText

Rename this file between md-rst-test.rst and md-rst-test.md to see the respective versions.

EDIT: This doesn't work. See my comment below.

Example syntax-highlighted Python code using a reStructuredText 0.9 directive:

def foo():
    return 'bar'

Example syntax-highlighted Python code using a Markdown codeblock:

```python def foo():

return 'bar'

```

@jfriedly
Copy link
Author

After much experimenting, I determined that it is impossible to make a file have Python syntax highlighting in either rst or md such that simply renaming the file's extension will make either version work.

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