# Pandoc doesn't convert markdown headings into sections

I'm trying out pandoc to convert markdown snippets in to tex, but for some reason it never converts headings. Here is the command I run, and the output I get:

\$ pandoc -f markdown -t latex src.md

Some \& ampersands.

Here's a quote.''

\begin{itemize}
\tightlist
\item
Here's a list.
\item
One more item.
\end{itemize}

\textbf{Bold}

\emph{emph}


Instead of converting # into \section, it treats it as a character that needs escaping, similarly to ampersands. What am I doing wrong?

The wrong escape is most likely because you are not starting the line with a #. That is, you input is
 # Heading (note space at beginning)

# Heading

• The snippet I pasted is pandoc's output – my input file, of course, doesn't contain the escape characters, but regular heading indicators (#, ##, etc). This is my problem – pandoc seems to add the escape characters during conversion. – Elise Sep 19 '16 at 16:26