Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to strip in-page links? #1

Open
brandjon opened this issue Dec 23, 2014 · 1 comment
Open

Option to strip in-page links? #1

brandjon opened this issue Dec 23, 2014 · 1 comment

Comments

@brandjon
Copy link

My use case is a GFM-formatted README.md that I want to display on PyPI correctly. PyPI refuses to render it because I have project-relative links, e.g.

[point.py](examples/point.py)

According to various StackOverflow threads and my own experiments, this is not allowed.

I wonder whether it would be within the scope of this project to strip these links, perhaps replacing them with the plain url or a constant placeholder. Apparently this is possible in pandoc by transforming the parsed AST, and the step can be done in Python code using pandocfilters.

Counterpoints against implementing this feature include:

  • (I presume) there are other GFM constructs that can't be easily represented in rst. In other words, we still can't save everyone.
  • PyPI may at some point become less anal about its input documents, making the effort obsolete.
@brandjon
Copy link
Author

Here's a gist for stripping links using pypandoc/pandocfilters. I don't know the setuptools magic needed to integrate it and make it optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant