Test Failed
Push — master ( 728016...1ac98c )
by P.R.
01:34
created

ItemizeHtmlFormatter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 1
c 1
b 1
f 0
dl 0
loc 16
ccs 0
cts 5
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A generate() 0 10 1
1
"""
2
SDoc
3
4
Copyright 2016 Set Based IT Consultancy
5
6
Licence MIT
7
"""
8
# ----------------------------------------------------------------------------------------------------------------------
9
from sdoc.sdoc2.NodeStore import NodeStore
10
from sdoc.sdoc2.formatter.html.HtmlFormatter import HtmlFormatter
11
12
13
class ItemizeHtmlFormatter(HtmlFormatter):
14
    """
15
    HtmlFormatter for generating HTML code for itemize.
16
    """
17
18
    # ------------------------------------------------------------------------------------------------------------------
19
    def generate(self, node, file):
20
        """
21
        Generates the HTML code for an itemize node.
22
23
        :param sdoc.sdoc2.node.ItemizeNode.ItemizeNode node: The itemize node.
24
        :param file file: The output file.
25
        """
26
        file.write('<ul>')
27
        HtmlFormatter.generate(self, node, file)
28
        file.write('</ul>')
29
30
31
# ----------------------------------------------------------------------------------------------------------------------
32
NodeStore.register_formatter('itemize', 'html', ItemizeHtmlFormatter)
33