ratatui_toolkit/widgets/markdown_widget/state/source_state/methods/content.rs
1//! Content method for SourceState.
2
3use crate::widgets::markdown_widget::state::source_state::SourceState;
4
5impl SourceState {
6 /// Get the current content from the source.
7 ///
8 /// # Returns
9 ///
10 /// The markdown content, or `None` if no source is set.
11 pub fn content(&self) -> Option<&str> {
12 self.source.as_ref().map(|s| s.content())
13 }
14}