Skip to main content

Module text

Module text 

Source
Expand description

Text formatter.

Re-exportsยง

use crate::EventIter; ๐Ÿ”’
use crate::util::header_text; ๐Ÿ”’
use crate::util::unwrap; ๐Ÿ”’
use anyhow::Error; ๐Ÿ”’
use anyhow::bail; ๐Ÿ”’
use pulldown_cmark::Alignment; ๐Ÿ”’
use pulldown_cmark::Event; ๐Ÿ”’
use pulldown_cmark::HeadingLevel; ๐Ÿ”’
use pulldown_cmark::LinkType; ๐Ÿ”’
use pulldown_cmark::Tag; ๐Ÿ”’
use pulldown_cmark::TagEnd; ๐Ÿ”’
use std::fmt::Write; ๐Ÿ”’
use std::mem; ๐Ÿ”’
use url::Url; ๐Ÿ”’

Structsยง

Table ๐Ÿ”’
TextFormatter
TextRenderer ๐Ÿ”’

Functionsยง

fill_cell ๐Ÿ”’
Formats a cell. Word-wraps based on width, and adjusts based on alignment.
fill_row ๐Ÿ”’
Formats a row, filling cells with spaces and word-wrapping text.
split_chunks ๐Ÿ”’
Splits the text on whitespace.