ratatui-toolkit 0.2.6

DEPRECATED: this crate was renamed to `ratkit`. Please migrate to `ratkit`.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Content method for SourceState.

use crate::widgets::markdown_widget::state::source_state::SourceState;

impl SourceState {
    /// Get the current content from the source.
    ///
    /// # Returns
    ///
    /// The markdown content, or `None` if no source is set.
    pub fn content(&self) -> Option<&str> {
        self.source.as_ref().map(|s| s.content())
    }
}