annotate: do not poorly split lines at CR (
issue5798)
mdiff and lines(text) take only LF as a line separator, but str.splitlines()
breaks our assumption. Use mdiff.splitnewlines() consistently.
It's hard to read \r in tests, so \r is replaced with [CR]. I had to wrap
sed by a shell function to silence check-code warning.
templater: add option to parse template string just like raw string literal
This seems a bit odd because the template syntax has no raw string literal
containing template fragments, but is necessary to port filename format string
to templater. See the next patch.