#5216 Allow whitespace before comments in well measurement import.

This commit is contained in:
Kristian Bendiksen
2020-01-06 20:27:53 +01:00
parent 7014f7e3a5
commit dbb60e6577
2 changed files with 2 additions and 1 deletions
@@ -185,7 +185,7 @@ bool RifWellMeasurementReader::isEmptyLine( const QString& line )
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RifWellMeasurementReader::isCommentLine( const QString& line ) bool RifWellMeasurementReader::isCommentLine( const QString& line )
{ {
return line.startsWith( "#" ); return line.trimmed().startsWith( "#" );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@@ -227,6 +227,7 @@ TEST( RifWellMeasurementReaderTest, CommentsAndEmptyLinesAreIgnored )
// Comment should be ignored // Comment should be ignored
out << "# This is a comment.\n"; out << "# This is a comment.\n";
out << "#This is also a comment.\n"; out << "#This is also a comment.\n";
out << " # This is also a comment which does not start on first character.\n";
// Should skip empty lines // Should skip empty lines
out << "\n"; out << "\n";
out << "\t\n"; out << "\t\n";