mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
Trim the withespaces & \r before comparing the lines to fix Windows \r
This commit is contained in:
parent
c1f3fa6178
commit
45f9cd116b
@ -399,20 +399,6 @@ void HTMLRenderer::post_process(void)
|
||||
long line_no = 0;
|
||||
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
|
||||
{
|
||||
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] == '#')
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user