- // If the template is a date, we must remove the newline at the end to
- // avoid LaTeX errors like the one described in bug #4398
- if (params.templatename() == "Date") {
- // depending on the OS we have either \r\n or only \n
- size_t pos = str.rfind('\r');
- if (pos != string::npos)
- str.erase(pos);
- pos = str.rfind('\n');
- if (pos != string::npos)
- str.erase(pos);
- }