If it is the first char, there is no new line before it. Thats why on my
was_newline I check for both newline and self.idx = 0