The following code in VB has wrong output due to \ escaping the closing " of the string. Rest of code is then printed as if it was in a string.
Any idea how to correct that?
\documentclass{article}
\usepackage[svgnames,table]{xcolor}
\usepackage{listingsutf8}
\begin{document}
\lstset
{
language={[Visual]Basic},
basicstyle=\scriptsize\color{Black}\ttfamily,
keywordstyle=\bfseries\color{Orange},
identifierstyle=\color{Blue},
stringstyle=\color{Red},
commentstyle=\color{Green}
}
\begin{lstlisting}
Function filtre1(chaine As String) As String
If Left(chaine, 1) = "\" And Not Right(chaine, 1) = "{" Then
filtre1 = chaine + " "
Else
filtre1 = chaine
End If
End Function
\end{lstlisting}
\end{document}
