reStructuredText:README.rst 未在 PyPI 上解析 [英] reStructuredText: README.rst not parsing on PyPI

查看:38
本文介绍了reStructuredText:README.rst 未在 PyPI 上解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个同时托管在 Github 和 PyPI 上的 Python 项目.

I have a Python project that is hosted on both Github and PyPI.

在 Github 上:https://github.com/sloria/TextBlob/blob/master/README.rst

On Github: https://github.com/sloria/TextBlob/blob/master/README.rst

在 PyPi 上:https://pypi.python.org/pypi/textblob

我的 README.rst 在 PyPI 上的格式似乎不正确,但在 Github 上看起来不错.

我已经阅读了这个,但我没有任何页内链接,所以这不是问题.

I have already read this, but I don't have any in-page links, so that's not the problem.

推荐答案

历史注释:这个答案涵盖了不再使用的 PyPI 版本,因为它已被替换为一个名为 Warehouse 的新服务器,它一直在跟踪 docutils 的发布(当时此注释为 0.16).如果您今天在重构文本渲染方面遇到问题,这个答案将不再对您有帮助.

Historical note: this answer covered a release of PyPI that is no longer used, as it has since been replaced by a new server called Warehouse, which has been tracking docutils releases as they come out (which at the time of this note, was 0.16). If you are having issues with Restructured Text rendering today, this answer will no longer help you.

原始答案如下.

您正在使用更新的文本角色,:code:.

You are using a newer text role, :code:.

PyPI 似乎只支持 docutils 0.8,将 codecode-block 直接添加到 PyPI 解析器中,这意味着 :code: 支持.

PyPI appears to only support docutils 0.8, with code and code-block added to the PyPI parser directly, which means that :code: is not supported.

GitHub 使用较新版本的 docutils(0.9 或 0.10).

GitHub uses a newer version of docutils (0.9 or 0.10).

完全删除 :code: 角色,因此替换:

Remove the :code: role altogether, so replace:

:code:`sentiment`

与:

`sentiment`

这篇关于reStructuredText:README.rst 未在 PyPI 上解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆