termcinema-cli 0.1.0

🎬 Animated terminal-to-SVG renderer CLI for the termcinema project
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// Interpret common escape sequences in a string.
///
/// This is used when `--no-escape` is not set, to turn literal sequences like `\\n`
/// into their actual characters.
///
/// Supported sequences:
/// - `\\n` → newline (`\n`)
/// - `\\t` → tab (`\t`)
/// - `\\r` → carriage return (`\r`)
pub(crate) fn interpret_escapes(input: &str) -> String {
    input
        .replace("\\n", "\n")
        .replace("\\t", "\t")
        .replace("\\r", "\r")
}