Codeframe
Capture pretty codeframes from a code snippet.
use Codeframe;
let raw_lines = "macro_rules! test_simple_style {
($string:expr, $style:ident) => {
#[test]
fn $style() {
assert_eq!(
s.$style().to_string(),
ansi_term::Style::new().$style().paint(s).to_string()
)
}
};
}";
let codeframe = new.set_color.capture;
Colors Supported
- Black
- Red
- Green
- Yellow
- Blue
- Magenta or (Purple)
- Cyan
- White
Features
- line
- raw lines
- color
- file path
- codeframe!() or codeframe!("red") Macro
- with column (Highlight Column)
- with line_above
- with line_below