pub struct ReflowOptions {
pub line_length: usize,
pub break_on_sentences: bool,
pub preserve_breaks: bool,
pub sentence_per_line: bool,
pub semantic_line_breaks: bool,
pub abbreviations: Option<Vec<String>>,
pub length_mode: ReflowLengthMode,
pub attr_lists: bool,
pub require_sentence_capital: bool,
pub max_list_continuation_indent: Option<usize>,
}Expand description
Options for reflowing text
Fields§
§line_length: usizeTarget line length
break_on_sentences: boolWhether to break on sentence boundaries when possible
preserve_breaks: boolWhether to preserve existing line breaks in paragraphs
sentence_per_line: boolWhether to enforce one sentence per line
semantic_line_breaks: boolWhether to use semantic line breaks (cascading split strategy)
abbreviations: Option<Vec<String>>Custom abbreviations for sentence detection Periods are optional - both “Dr” and “Dr.” work the same Custom abbreviations are always added to the built-in defaults
length_mode: ReflowLengthModeHow to measure string length for line-length comparisons
attr_lists: boolWhether to treat {#id .class key=“value”} as atomic (unsplittable) elements. Enabled for MkDocs and Kramdown flavors.
require_sentence_capital: boolWhether to require uppercase after periods for sentence detection. When true (default), only “word. Capital” is a sentence boundary. When false, “word. lowercase” is also treated as a sentence boundary. Does not affect ! and ? which are always treated as sentence boundaries.
max_list_continuation_indent: Option<usize>Cap list continuation indent to this value when set. Used by mkdocs flavor where continuation is always 4 spaces regardless of checkbox markers.
Trait Implementations§
Source§impl Clone for ReflowOptions
impl Clone for ReflowOptions
Source§fn clone(&self) -> ReflowOptions
fn clone(&self) -> ReflowOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ReflowOptions
impl RefUnwindSafe for ReflowOptions
impl Send for ReflowOptions
impl Sync for ReflowOptions
impl Unpin for ReflowOptions
impl UnsafeUnpin for ReflowOptions
impl UnwindSafe for ReflowOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more