Skip to content

Commit

Permalink
Merge pull request #53 from yajiya/master
Browse files Browse the repository at this point in the history
Fix incorrect logic of \r\n and \n.
  • Loading branch information
Wuvist committed May 5, 2016
2 parents c9580ee + 1ef71f2 commit cf3eba4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gorazor/lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func makeToken(val string, tokenType int) Token {
func (lexer *Lexer) Scan() ([]Token, error) {
toks := []Token{}
text := strings.Replace(lexer.Text, "\r\n", "\n", -1)
text = strings.Replace(lexer.Text, "\r", "\n", -1)
text = strings.Replace(text, "\r", "\n", -1)
text += "\n"
cur, line, pos := 0, 0, 0
for cur < len(text) {
Expand Down

0 comments on commit cf3eba4

Please sign in to comment.