From 45f9cd116bfdb07470f5eba4d7a5d03909518cfc Mon Sep 17 00:00:00 2001 From: Marc Sanfacon Date: Fri, 29 Nov 2013 14:00:14 -0500 Subject: [PATCH] Trim the withespaces & \r before comparing the lines to fix Windows \r --- src/HTMLRenderer/general.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/HTMLRenderer/general.cc b/src/HTMLRenderer/general.cc index 2d5721a..94cf02d 100644 --- a/src/HTMLRenderer/general.cc +++ b/src/HTMLRenderer/general.cc @@ -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;