Iterator over an alternating sequence of functional and commented parts of
a string. The first item is always a, possibly zero length, subslice of
functional text. Line style comments contain their ending newlines.
Iterator over the ‘payload’ characters of a comment.
It skips whitespace, comment start/end marks, and ‘*’ at the beginning of lines.
The comment must be one comment, ie not more than one start mark (no multiple line comments,
for example).
Iterator over functional and commented parts of a string. Any part of a string is either
functional code, either one block comment, either one line comment. Whitespace between
comments is functional code. Line comments contain their ending newlines.
Distinguish between functional part of code and comments,
describing opening and closing of comments for ease when chunking
code from tagged characters
Combine prev_str and next_str into a single String. span may contain
comments between two strings. If there are such comments, then that will be
recovered. If allow_extend is true and there is no comment between the two
strings, then they will be put on a single line as long as doing so does not
exceed max width.
Determine the line_start when formatting markdown block quotes.
The original line_start likely contains indentation (whitespaces), which we’d like to
replace with ’> ’ characters.
Trims comment characters and possibly a single space from the left of a string.
Does not trim all whitespace. If a single space is trimmed from the left of the string,
this function returns true.
Recover the missing comments in the specified span, if available.
The layout of the comments will be preserved as long as it does not break the code
and its total width does not exceed the max width.
Given the span, rewrite the missing comment inside it if available.
Note that the given span must only include comments (or leading/trailing whitespaces).