When setting options for \lstinline with brackets, the syntax highlighting assumes that the opening bracket [ is the delimiter for the listing code. In the following example file, the syntax highlighting is correct for the first usage of \lstinline. The second usage, however, sets the language for the listing with brackets, and all characters until the next [ are highlighted as if they were part of the listing.
\documentclass{article}
\usepackage{listings}
\begin{document}
The declaration \lstinline|int x;| creates a new variable.
The declaration \lstinline[language=C]|int x;| creates a new variable.
\end{document}
(The Markdown highlighting here seems to have the same problem).