我希望我就在这个 channel /标签中。
我正在使用 lazydocs用于自动生成我的 md 文件。
我的项目是用 Python 3.7.5 编写的。
我的文档字符串中有一些项目符号列表。
根据这个example我需要留下一个空行,然后是 4 个空格,例如“-”紧随其后,项目符号列表的末尾又是一个空行。
这里有一个例子:
"""This is my example docstring
A simple bullet list:
- point 1
- point 2
- point 3
"""
但是当我使用 lazydocs
生成我的 md 文件时md 文件如下所示:This is my example docstring
A simple bullet list:
- point 1 - point 2 - point 3
我希望我的 md 文件看起来像This is my example docstring
A simple bullet list:
- point 1
- point 2
- point 3
然后我尝试了一下。我发现在项目符号之间留一个空行会使 lazydocs
以预期的格式生成我的 md5 文件。看起来像这样:
"""This is my example docstring
A simple bullet list:
- point 1
- point 2
- point 3
"""
但是在我的代码中插入空行并不是记录我的代码的好方法,我猜:)所以我的问题:
我在这里做错了什么还是
lazydocs
没有正确处理要点?非常感谢这里的任何帮助!
最佳答案
我们刚刚发布了 lazydocs
的新版本(0.4.4) 支持项目符号列表。您可以通过以下方式升级:
pip install --upgrade lazydocs
此版本lazydocs
中使用项目符号列表的正确方法将没有缩进:"""This is my example docstring
A simple bullet list:
- point 1
- point 2
- point 3
"""
关于python-3.x - LazyDocs - 生成的 *.md 文件不代表项目符号列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66454184/