termcinema-cli 0.1.0

🎬 Animated terminal-to-SVG renderer CLI for the termcinema project
Documentation
use crate::utils::interpret_escapes;

/// Resolve the final plain text to be rendered.
///
/// Applies escape sequence interpretation unless:
/// - The input is from a script (`--script`)
/// - Or `--no-escape` is explicitly set
///
/// Supports sequences like:
/// - `\\n` → newline
/// - `\\t` → tab
/// - `\\r` → carriage return
///
/// Returns the processed or raw string, depending on context.
pub(crate) fn resolve_plain_text(raw: String, is_script: bool, no_escape: bool) -> String {
    if is_script || no_escape {
        raw
    } else {
        interpret_escapes(&raw)
    }
}