1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-08-24 20:37:41 +00:00

Trim the withespaces & \r before comparing the lines to fix Windows \r

This commit is contained in:
Marc Sanfacon 2013-11-29 14:00:14 -05:00
parent c1f3fa6178
commit 45f9cd116b

View File

@ -399,20 +399,6 @@ void HTMLRenderer::post_process(void)
long line_no = 0; long line_no = 0;
while(getline(manifest_fin, line)) while(getline(manifest_fin, line))
{ {
++line_no;
if(line == "\"\"\"")
{
embed_string = !embed_string;
continue;
}
if(embed_string)
{
output << line << endl;
continue;
}
// trim space at both sides // trim space at both sides
{ {
static const char * whitespaces = " \t\n\v\f\r"; static const char * whitespaces = " \t\n\v\f\r";
@ -429,6 +415,20 @@ void HTMLRenderer::post_process(void)
} }
} }
++line_no;
if(line == "\"\"\"")
{
embed_string = !embed_string;
continue;
}
if(embed_string)
{
output << line << endl;
continue;
}
if(line.empty() || line[0] == '#') if(line.empty() || line[0] == '#')
continue; continue;