pub fn from(
        variant: CommentVariant,
        content: &str,
        pre: usize,
        post: usize,
        line: usize,
        column: usize,
    ) -> std::result::Result<TrimmedLiteral, String> {
        let content_chars_len = content.chars().count();
        let mut span = Span {
            start: LineColumn { line, column },
            end: LineColumn {
                line,
                column: column + content_chars_len,
            },
        };

        trim_span(content, &mut span, pre, post + 1);

        Ok(TrimmedLiteral {
            variant,
            span,
            rendered: content.to_string(),
            pre,
            post,
            len_in_chars: content_chars_len - pre - post,
            len_in_bytes: content.len() - pre - post,
        })
    }
Creates a new (single line) literal from the variant, the content, the
size of the pre & post and the line/column on which it starts. Fails if
provided with multiline content (i.e. if the content contains a
line-break).
doc-chunks/src/literal.rs