相关疑难解决方法(0)

如何使用sphinx生成python文档时保留换行符

我正在使用Sphinx为python项目生成文档.输出html不保留docstring中存在的换行符.例:

def testMethod(arg1,arg2):
    """
    This is a test method

    Arguments:
    arg1: arg1 description
    arg2: arg2 description

    Returns:
    None
    """
    print "I am a test method"
Run Code Online (Sandbox Code Playgroud)

狮身人面像O/P:

TestModule.testMethod(arg1, arg2)

This is a test method

Arguments: arg1: arg1 description arg2: arg2 description

Returns: None
Run Code Online (Sandbox Code Playgroud)

知道怎么解决吗?

python python-sphinx

46
推荐指数
5
解决办法
3万
查看次数

如何为reStructuredText,Sphinx,ReadTheDocs等设置自定义样式?

我想用我自己的自定义样式扩展SphinxReadTheDocs使用的主题.

我能做到这一点的最佳方式是什么,以便我的改变能够坚持下去?

css restructuredtext python-sphinx read-the-docs

13
推荐指数
1
解决办法
3572
查看次数