Skip to content

Commit

Permalink
Fix code blocks messing up stuff.
Browse files Browse the repository at this point in the history
Closes #8.

Signed-off-by: Slendi <[email protected]>
  • Loading branch information
slendidev committed Feb 27, 2025
1 parent d1d91d8 commit e38adca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub async fn process_response(
language.clear();
}
}
} else if ch == '*' || ch == '_' {
} else if !in_code_block && (ch == '*' || ch == '_') {
if text_effected {
star_cnt -= 1;
if star_cnt == 0 {
Expand All @@ -100,7 +100,7 @@ pub async fn process_response(
print!("\x1b[0;1;3m");
}
}
} else if ch == '#' {
} else if !in_code_block && ch == '#' {
print!("\x1b[1m#");
next_newline_reset = true;
} else {
Expand Down

0 comments on commit e38adca

Please sign in to comment.