mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05: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 )
|
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";
|
||||||
|
|||||||
Reference in New Issue
Block a user