def _format(self, content: str) -> str:
"""Format plain text for the text output.
Args:
content: The text to be formatted.
Returns:
The formatted text as a string.
"""
if self.formatter.manual_markup:
output_text, positions = self.parse_manual_markup(content)
else:
output_text, positions = content, MarkupPositions([], [])
wrapper = textwrap.TextWrapper(width=self._width)
output_text = wrapper.fill(output_text)
output_text = self._apply_markup(output_text, positions)
return textwrap.indent(output_text, " "*self._current_indent)
评论列表
文章目录