erlyaws / yaws

Yaws webserver
https://erlyaws.github.io
BSD 3-Clause "New" or "Revised" License
1.28k stars 267 forks source link

Fix line numbering in yaws_html #437

Closed Maria-12648430 closed 2 years ago

Maria-12648430 commented 2 years ago

Not sure yaws_html is used at all, it seems to be completely undocumented, and a quick grep -r in the code didn't yield much in that line, but anyway:

The line number tracking is not working correctly in the current implementation. The line counter will be increased when it encounters a LF (Unix line ending) or a CR (old Mac line ending). The counter will be increased twice when it encounters a CRLF (Windows line ending), that is, once for CR, and again for LF.

vinoski commented 2 years ago

Thanks! Rebased to master.

As for whether yaws_html is used or not, it's hard to say. It looks like it was added long ago in support of one of the Yaws applications. Some users out there might be using it for their own apps.