Skip to content

Commit

Permalink
fix: Adjust EmphText handling to avoid extra braces and line breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed Dec 4, 2024
1 parent d92a483 commit 55e5fcd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@ fn parse_tokens(lex: logos::Lexer<Token>) -> Node {
args: vec![text],
body: None
});
// Don't add extra newline after em command
match nodes.last_mut() {
Some(Node::Command { body: None, .. }) => (),
_ => nodes.push(Node::Text(" ".to_string()))
}
}
Ok(Token::Text(text)) => {
if !text.is_empty() {
Expand Down

0 comments on commit 55e5fcd

Please sign in to comment.