6bf3f89d69
Closes #1905. Removed stateChapters from ParserState. Now we parse chapters as level 0 headers, and parts as level -1 headers. After parsing, we check for the lowest header level, and if it's less than 1 we bump everything up so that 1 is the lowest header level. So `\part` will always produce a header; no command-line options are needed.
30 lines
435 B
Markdown
30 lines
435 B
Markdown
```
|
|
% pandoc -f latex-auto_identifiers -t html
|
|
\chapter{chapone}
|
|
\part{partone}
|
|
\chapter{chaptwo}
|
|
\section{secone}
|
|
^D
|
|
<h2>chapone</h2>
|
|
<h1>partone</h1>
|
|
<h2>chaptwo</h2>
|
|
<h3>secone</h3>
|
|
```
|
|
|
|
```
|
|
% pandoc -f latex-auto_identifiers -t html
|
|
\chapter{chapone}
|
|
\chapter{chaptwo}
|
|
\section{secone}
|
|
^D
|
|
<h1>chapone</h1>
|
|
<h1>chaptwo</h1>
|
|
<h2>secone</h2>
|
|
```
|
|
|
|
```
|
|
% pandoc -f latex-auto_identifiers -t html
|
|
\section{secone}
|
|
^D
|
|
<h1>secone</h1>
|
|
```
|