diff options
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 3 | ||||
-rw-r--r-- | test/command/1745.md | 13 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index b207e79e0..a616058bb 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -1130,7 +1130,8 @@ registerHeader (ident,classes,kvs) header' = do updateState $ updateHeaderMap $ insert' header' id' return (id'',classes,kvs) else do - unless (null ident) $ + unless (null ident) $ do + updateState $ updateIdentifierList $ Set.insert ident updateState $ updateHeaderMap $ insert' header' ident return (ident,classes,kvs) diff --git a/test/command/1745.md b/test/command/1745.md new file mode 100644 index 000000000..cf987c20f --- /dev/null +++ b/test/command/1745.md @@ -0,0 +1,13 @@ +``` +% pandoc -f latex+auto_identifiers -t html +\section{Six favourite beers} +\subsection{Jovaru Alus}\label{jovaru-alus} +\section{Farmhouse brewers} +\subsection{Jovaru Alus} +^D +<h1 id="six-favourite-beers">Six favourite beers</h1> +<h2 id="jovaru-alus">Jovaru Alus</h2> +<h1 id="farmhouse-brewers">Farmhouse brewers</h1> +<h2 id="jovaru-alus-1">Jovaru Alus</h2> +``` + |