I'm searching a way to correctly include one piece of C code into Latex document. However, it contains some unusual, but valid structures, including a two-line-comment. Minted handles it right, but its's output has some other problems. The main problem is that "spanned into two lines" does not appear as a comment line. Here is MWE
\documentclass{article}
\usepackage{listings}
\usepackage[dvipsnames]{xcolor}
\begin{document}
\lstset{language=C,
commentstyle=\color{NavyBlue}}
\begin{lstlisting}
int main(void) {
//one line comment\
spanned into two lines
return 0;
}
\end{lstlisting}
\end{document}

listings... – CarLaTeX Apr 06 '18 at 05:09