Skip to content

Handle \r in tor-netdoc

Saksham Mittal requested to merge gotlou/arti:tokenize-carriage into main

As described in the TODO, "we should probably detect \r and do something about it. Just ignoring it isn't the right answer, though."

I modified the code to first check for a \r and if it finds it, remove it from the string. If there is no \r, it then just checks for \n and removes that, else it throws the error.

This helps handle both \r\n and \n terminated files while parsing

Merge request reports