diff options
Diffstat (limited to 'rst/src/main.rs')
| -rw-r--r-- | rst/src/main.rs | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/rst/src/main.rs b/rst/src/main.rs index 0339ce1..8b616f9 100644 --- a/rst/src/main.rs +++ b/rst/src/main.rs @@ -32,7 +32,11 @@ fn main() -> CliResult {      args.verbosity.setup_env_logger("rst")?;      // TODO: somehow make it work without replacing tabs -    let content = read_file(args.file)?.replace('\t', " ".repeat(8).as_ref()); +    let mut content = read_file(args.file)?.replace('\t', " ".repeat(8).as_ref()); +    // Allows for less complex grammar +    if !content.ends_with('\n') { +        content.push('\n'); +    }      let document = parse(&content)?;      let stdout = std::io::stdout();      match args.format { | 
