mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5216 Allow whitespace before comments in well measurement import.
This commit is contained in:
@@ -185,7 +185,7 @@ bool RifWellMeasurementReader::isEmptyLine( 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
|
||||
out << "# This is 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
|
||||
out << "\n";
|
||||
out << "\t\n";
|
||||
|
||||
Reference in New Issue
Block a user