diff --git a/pulumi_wasm_generator_lib/src/description.rs b/pulumi_wasm_generator_lib/src/description.rs index 910ebd95..e701bcd5 100644 --- a/pulumi_wasm_generator_lib/src/description.rs +++ b/pulumi_wasm_generator_lib/src/description.rs @@ -52,8 +52,8 @@ impl<'a> Description<'a> { fn initial_transition(line: &str) -> (State, Vec) { match line.trim() { "" | "{{% examples %}}" => (Examples, vec![]), - // Rustdoc treats ``` as rust code block - "```" => (LanguageOutsideExamples, vec!["```sh".to_string()]), + // Rustdoc treats ``` as rust code block. Line may contain whitespace before + "```" => (LanguageOutsideExamples, vec![line.to_string() + "sh"]), l if l.starts_with("```") => (LanguageOutsideExamples, vec![line.to_string()]), _ => (Initial, vec![line.to_string()]), }