items.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:linotype 作者: lostatc 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号