generate_changelog.actions.text_processing.WrapParagraphs

WrapParagraphs#

class generate_changelog.actions.text_processing.WrapParagraphs[source]#

Create a callable to wrap the paragraphs of a string.

paragraph_pattern: Union[str, Callable[[], str]] = '\n\n'#

Pattern to detect paragraphs.

__init__(paragraph_pattern='\\n\\n', paragraph_join='\\n\\n', width=88)#
Parameters:
Return type:

None

paragraph_join: Union[str, Callable[[], str]] = '\n\n'#

Join the wrapped paragraphs with this string.

width: int = 88#

The maximum width of each line of the paragraph.

__call__(input_text)[source]#

Wrap each paragraph of the input text.

Return type:

str

Parameters:

input_text (str | Callable[[], str]) –