Make detection of literal strings and comments more flexible