| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 60% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | """ |
||
| 14 | 1 | class HyperlinkHtmlFormatter(HtmlFormatter): |
|
| 15 | """ |
||
| 16 | HtmlFormatter for generating HTML code for hyperlinks. |
||
| 17 | """ |
||
| 18 | # ------------------------------------------------------------------------------------------------------------------ |
||
| 19 | 1 | def generate(self, node, file): |
|
| 20 | """ |
||
| 21 | Generates the HTML code for a hyperlink node. |
||
| 22 | |||
| 23 | :param sdoc.sdoc2.node.HyperlinkNode.HyperlinkNode node: The hyperlink node. |
||
| 24 | :param file file: The output file. |
||
| 25 | """ |
||
| 26 | file.write(HyperlinkHtmlFormatter.get_html(node)) |
||
| 27 | |||
| 28 | # ------------------------------------------------------------------------------------------------------------------ |
||
| 29 | 1 | @staticmethod |
|
| 30 | def get_html(node): |
||
| 31 | """ |
||
| 32 | Returns string with generated HTML tag. |
||
| 33 | |||
| 34 | :param sdoc.sdoc2.node.HyperlinkNode.HyperlinkNode node: The hyperlink node. |
||
| 35 | |||
| 36 | :rtype: str |
||
| 37 | """ |
||
| 38 | return Html.generate_element('a', node.get_html_attributes(), node.argument) |
||
| 39 | |||
| 42 |