We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4a3d82 commit 0797686Copy full SHA for 0797686
crates/quarto-markdown-pandoc/src/readers/qmd.rs
@@ -68,6 +68,14 @@ pub fn read<T: Write>(
68
_ => {}
69
})));
70
71
+ // inefficient, but safe: if no trailing newline, add one
72
+ if !input_bytes.ends_with(b"\n") {
73
+ let mut input_bytes_with_newline = Vec::with_capacity(input_bytes.len() + 1);
74
+ input_bytes_with_newline.extend_from_slice(input_bytes);
75
+ input_bytes_with_newline.push(b'\n');
76
+ return read(&input_bytes_with_newline, _loose, filename, output_stream);
77
+ }
78
+
79
let tree = parser
80
.parse(&input_bytes, None)
81
.expect("Failed to parse input");
0 commit comments