Total Complexity | 1 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | """ |
||
13 | 1 | class DocumentHtmlFormatter(HtmlFormatter): |
|
14 | """ |
||
15 | HtmlFormatter for generating HTML code for document. |
||
16 | """ |
||
17 | |||
18 | # ------------------------------------------------------------------------------------------------------------------ |
||
19 | 1 | def generate(self, node, file): |
|
20 | """ |
||
21 | Generates the HTML code for a document node. |
||
22 | |||
23 | :param sdoc.sdoc2.node.DocumentNode.DocumentNode node: The document node. |
||
24 | :param file file: The output file. |
||
25 | """ |
||
26 | 1 | file.write('<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="NL" lang="NL">') |
|
27 | 1 | file.write('<head><meta charset="UTF-8"/><title>sdoc</title></head>') |
|
28 | 1 | file.write('<body>') |
|
29 | |||
30 | 1 | HtmlFormatter.generate(self, node, file) |
|
31 | |||
32 | 1 | file.write('</body>') |
|
33 | 1 | file.write('</html>') |
|
34 | 1 | file.close() |
|
35 | |||
39 |