Don't split string just for counting "\n"
Merge pull request #226 from themalkolm/patch-2

Don't split string just for counting "\n"