Skip to content

Commit

Permalink
Fix new line with git diff header
Browse files Browse the repository at this point in the history
  • Loading branch information
Laura Cameran committed Jun 28, 2021
1 parent 440555f commit 28969b2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ object GitDiffParser extends RegexParsers {

def ctxLine: Parser[CtxLine] = " " ~> """.*""".r <~ opt(nl) ^^ { l => CtxLine(l) }

def addedLine: Parser[AddedLine] = "+" ~> """.*""".r <~ opt(nl) ^^ { l => AddedLine(l) }
// Temporary fix gitDiffHeader within new line (read every line up to the following diff)
def addedLine: Parser[AddedLine] = "+" ~> readUpToNextDiffOrEnd ^^ { l => AddedLine(l) }
//def addedLine: Parser[AddedLine] = "+" ~> """.*""".r <~ opt(nl) ^^ { l => AddedLine(l) }

def removedLine: Parser[RemovedLine] = "-" ~> """.*""".r <~ opt(nl) ^^ { l => RemovedLine(l) }

Expand Down

0 comments on commit 28969b2

Please sign in to comment.