From 577ed0ad24dd9ddb3639569307473feed52a76d3 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Fri, 6 Feb 2015 19:22:10 +0100 Subject: added chapter to DemoHTMLOutput --- src/plugins/html/DemoOutput.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/plugins/html/DemoOutput.cpp b/src/plugins/html/DemoOutput.cpp index cefb3c9..eddff7b 100644 --- a/src/plugins/html/DemoOutput.cpp +++ b/src/plugins/html/DemoOutput.cpp @@ -82,12 +82,14 @@ void DemoHTMLTransformer::writeHTML(Handle doc, /** * This is just for easier internal handling. */ -enum class SectionType { BOOK, SECTION, SUBSECTION, NONE }; +enum class SectionType { BOOK, CHAPTER, SECTION, SUBSECTION, NONE }; SectionType getSectionType(const std::string &name) { if (name == "book") { return SectionType::BOOK; + } else if (name == "chapter") { + return SectionType::CHAPTER; } else if (name == "section") { return SectionType::SECTION; } else if (name == "subsection") { @@ -122,12 +124,15 @@ Rooted DemoHTMLTransformer::transformSection( case SectionType::BOOK: headingclass = "h1"; break; - case SectionType::SECTION: + case SectionType::CHAPTER: headingclass = "h2"; break; - case SectionType::SUBSECTION: + case SectionType::SECTION: headingclass = "h3"; break; + case SectionType::SUBSECTION: + headingclass = "h4"; + break; case SectionType::NONE: // this can not happen; break; -- cgit v1.2.3