修改有效的rst文本以适应给定的宽度
reflowrst的Python项目详细描述
安装
>>> sudo pip install reflowrst
用法
示例:
>>> from reflowrst import reflow >>> text = 'Here is a paragraph that is far too long and will need to wrap.' >>> print(reflow(text, 47)) Here is a paragraph that is far too long and will need to wrap.
您还可以使用0获得最长的rst文本格式 为了空间例如:
>>> paragraph = '''Here is a paragraph that is far too long and will need to wrap.''' >>> print(reflow(paragraph, 0)) Here is a paragraph that is far too long and will need to wrap.
待办事项
- 冠军
- {转换
- {段落
- {项目符号列表
- {枚举列表
- {定义
- {字段
- {选项
- {文字块
- ☆引用的文字块
- 线块
- {方块引号
- ☆Doctest区块
- {网格表
- {简单表格
- {脚注
- {引文
- {指令