# Why do code snippets not work after lists?

I want to insert a code snippet after a list but the code snippet is not a part of the list item.

1. This is the first item.
2. This is the second item

\documentclass{article} \begin{document} \end{document}

Should I always insert a rule to make it work?

1. This is the first item.
2. This is the second item

A dummy rule is added to fix this problem.

\documentclass{article}
\begin{document}
\end{document}


The same issue happened in StackOverflow. I have just checked it.

You could insert a piece of invisible HTML code:

 1. This is the first item.
2. This is the second item

<!-- code follows -->

\documentclass{article}
\begin{document}
\end{document}


Output:

1. This is the first item.
2. This is the second item

\documentclass{article}
\begin{document}
\end{document}

• I see that this issue is here for about 4 years and it still here, is there anyone working on it? (by the way your answer works good) – SAM Jul 9 '16 at 5:09