Skip to content

Commit

Permalink
Remove table of contents when converting README to rst for PyPI
Browse files Browse the repository at this point in the history
PyPI does not support internal document links (starting with #).
https://stackoverflow.com/a/16594755/223267
  • Loading branch information
danielhers committed Nov 7, 2017
1 parent 81132c5 commit e80e4dd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ def run(self):
try:
import pypandoc
long_description = pypandoc.convert("README.md", "rst")
long_description = "\n".join(line for line in long_description.splitlines() if "<#" not in line)
except:
long_description = ""

Expand Down

0 comments on commit e80e4dd

Please sign in to comment.