allow windows newlines in TDB2 files
This commit is contained in:
@@ -27,7 +27,8 @@ impl File {
|
|||||||
|
|
||||||
fn parse(input: &str) -> IResult<&str, File> {
|
fn parse(input: &str) -> IResult<&str, File> {
|
||||||
all_consuming(fold_many0(
|
all_consuming(fold_many0(
|
||||||
terminated(Line::parse, char('\n')),
|
// allow windows or normal newlines
|
||||||
|
terminated(Line::parse, pair(opt(char('\r')), char('\n'))),
|
||||||
File { lines: vec![] },
|
File { lines: vec![] },
|
||||||
|mut file, line| {
|
|mut file, line| {
|
||||||
file.lines.push(line);
|
file.lines.push(line);
|
||||||
|
|||||||
Reference in New Issue
Block a user