From c88b701e961bdfb5aa4b8673c9d67475353f494d Mon Sep 17 00:00:00 2001 From: SavagePeanut Date: Mon, 29 Jul 2024 13:40:13 -0500 Subject: escape angle brackets <> for matrix --- src/parser.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/parser.rs') diff --git a/src/parser.rs b/src/parser.rs index 404bb15..b44d2d0 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -22,14 +22,21 @@ pub fn parse_with_limits(chars: &Vec, start: usize, end: usize, depth: usi styles.append(&mut parse_with_limits(chars, index + 1, to, depth + 1)); index = to; continue; - } - if is_nested_quote(chars, index, depth) { + } else if is_nested_quote(chars, index, depth) { styles.push((">>".to_owned(), index, index + 1, index + 1, index + 1)); + } else { + styles.push((">".to_owned(), index, index + 1, index + 1, index + 1)); } index += 1; continue; } + if c == '<' { + styles.push(("<".to_owned(), index, index + 1, index + 1, index + 1)); + index += 1; + continue; + } + if c == '`' && is_char_repeating(chars, c, 2, index + 1, end) { let end_of_line = seek_end_of_line(chars, index + 1, end); if end_of_line == end { -- cgit v1.2.3