1
0
mirror of https://github.com/lise-henry/crowbook synced 2024-11-18 00:13:55 +01:00

html: bug fix in numbering of unnumbered chapters

This commit is contained in:
Elisabeth Henry 2016-02-25 19:12:45 +01:00
parent c4c0699708
commit 3fba98fc3b
3 changed files with 12 additions and 2 deletions

@ -1,6 +1,12 @@
ChangeLog
=========
0.2.1 (unreleased)
------------------
* Bugfixes:
* HTML/Epub rendering no longer incorrectly increment chapter
count for unnumbered chapters
0.2.0 (2016-02-25)
------------------
* Command line arguments:

@ -1,6 +1,8 @@
Crowbook
========
[![Build Status](https://travis-ci.org/lise-henry/crowbook.svg?branch=master)](https://travis-ci.org/lise-henry/crowbook)
Render a markdown book in HTML, Epub or PDF.
Crowbook's purpose is to allow you to automatically generate multiple
@ -8,7 +10,7 @@ outputs formats from a book written in Markdown. Its main focus is
novels, and the default settings should (hopefully) generate readables
book with correct typography.
[![Build Status](https://travis-ci.org/lise-henry/crowbook.svg?branch=master)](https://travis-ci.org/lise-henry/crowbook)
Installing
----------

@ -193,7 +193,9 @@ impl<'a> HtmlRenderer<'a> {
},
Token::Paragraph(ref vec) => format!("<p>{}</p>\n", self.render_vec(vec)),
Token::Header(n, ref vec) => {
self.inc_header(n - 1);
if self.current_numbering >= n {
self.inc_header(n - 1);
}
if n == 1 && self.current_hide {
return String::new();
}