summaryrefslogtreecommitdiff
path: root/src/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.rs')
-rw-r--r--src/parser.rs11
1 files changed, 9 insertions, 2 deletions
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<char>, 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(("&gt;".to_owned(), index, index + 1, index + 1, index + 1));
}
index += 1;
continue;
}
+ if c == '<' {
+ styles.push(("&lt;".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 {