Skip to content

Commit

Permalink
Fix line numbers to one-based in SplitText's errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tailhook committed Feb 13, 2018
1 parent b15670c commit 677acf2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/render/apply/split_text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ impl Action for SplitText {
let mut file = None;
let mut name = None::<String>;
for (num, line) in src.lines().enumerate() {
let num = num+1;
let line = line.map_err(Error::IoError)?;
if file.is_none() {
if !line.trim().is_empty() {
Expand Down

0 comments on commit 677acf2

Please sign in to comment.