Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 47f1af8

Browse files
committedDec 3, 2024·
Apply text wrap correctly to inline code
1 parent 89337c7 commit 47f1af8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/generation/generate.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ fn gen_code_block(code_block: &CodeBlock, context: &mut Context) -> PrintItems {
433433
}
434434
}
435435

436-
fn gen_code(code: &Code, _: &mut Context) -> PrintItems {
436+
fn gen_code(code: &Code, context: &mut Context) -> PrintItems {
437437
let text = code.code.trim();
438438
let mut backtick_text = "`";
439439
let mut separator = "";
@@ -444,7 +444,8 @@ fn gen_code(code: &Code, _: &mut Context) -> PrintItems {
444444
}
445445
}
446446

447-
format!("{0}{1}{2}{1}{0}", backtick_text, separator, text).into()
447+
let full_string = format!("{0}{1}{2}{1}{0}", backtick_text, separator, text);
448+
gen_str(&full_string, context)
448449
}
449450

450451
fn gen_text(text: &Text, context: &mut Context) -> PrintItems {

0 commit comments

Comments
 (0)
Please sign in to comment.