Completed
Push — master ( 793cf7...172351 )
by P.R.
04:33
created

LabelHtmlFormatter   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 66.67%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
dl 0
loc 14
ccs 2
cts 3
cp 0.6667
rs 10

1 Method

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