if AllowCppStyleComment:\r
Line = Line.replace(DataType.TAB_COMMENT_R8_SPLIT, CommentCharacter)\r
#\r
- # remove comments\r
+ # remove comments, but we should escape comment character in string\r
#\r
- Line = Line.split(CommentCharacter, 1)[0];\r
+ InString = False\r
+ for Index in range(0, len(Line)):\r
+ if Line[Index] == '"':\r
+ InString = not InString\r
+ elif Line[Index] == CommentCharacter and not InString:\r
+ Line = Line[0: Index]\r
+ break\r
+ \r
#\r
# remove whitespace again\r
#\r