Consider this string (without quotes):
"<html><head><title>Hi I am jake</title></head>\n\n\n<body><p div=\"id\">What!</p></body></html>"
I print the dom tree. For the three newlines in between the positions of the newlines in the output are given as 5@[46;49)
This is counting only two newlines. The positions of the rest of the elements is also given incorrect.
Here is the source: http://pastebin.com/WvF7Cm91
Here is the output:
-----
0@[0;90)
1@[0;90) html
2@[6;46) head
3@[12;39) title
4@[19;31) Hi I am jake
5@[46;49)
6@[49;83) body
7@[55;76) p
8@[67;72) What!
-----
This looks correct. Which output did you expect?
I expect it to be 5@[46;50)