Preserve the leading whitespace before an escape.
This commit is contained in:
@@ -45,7 +45,7 @@ pub struct ExampleBlock<'s> {
|
||||
pub retain_labels: bool,
|
||||
pub use_labels: bool,
|
||||
pub label_format: Option<&'s str>,
|
||||
pub contents: Vec<&'s str>,
|
||||
pub contents: String,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
@@ -237,16 +237,3 @@ impl<'s> Comment<'s> {
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
impl<'s> ExampleBlock<'s> {
|
||||
/// Get the inner contents of the ExampleBlock with the escaping commas removed.
|
||||
pub fn get_contents(&self) -> String {
|
||||
let final_size = self.contents.iter().map(|line| line.len()).sum();
|
||||
let mut ret = String::with_capacity(final_size);
|
||||
for line in &self.contents {
|
||||
ret.push_str(line);
|
||||
}
|
||||
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user