我正在尝试将我的Google样式文档字符串转换为html文档。 像这样:
out = docutils.publish_string(rst, writer_name='html', settings_overrides=rst_opts)
我从函数doc传递了我的google doc字符串。
"""
Uploads a compiled model to a HIL device.
Args:
param_a (str): blabla.
param_b (bool): ``True`` blabla.
param_C (bool): blbablalbalbl ``True`` .
.. note::
.Lorem Ipsum is simply dummy text of the printing and typesetting industry
Returns:
``True`` Lorem Ipsum is simply dummy text of the printing and typesetting industry. ``False``.
Availability:
* Lorem Ipsum is simply dummy text of the printing and typesetting industry
Example::
# loading model
status = load_model(file = r"./examples/models/3phaseRectifier Target files/3phaseRectifier.cpd")
if status:
# if loading went successfully we can continue
...
"""
,我得到了html的返回值,除参数外,所有内容的格式都正确 example of poor formatting of parameters。
如您所见,参数不是一个个在另一个之上,而是粘在一起的。
但是,如果我在参数之间插入空行,则会正确生成see here
如果有人知道如何拆分参数,那将对我有很大帮助。谢谢。