| Conditions | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 1 |
| CRAP Score | 4.3145 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | """ |
||
| 21 | 1 | def generate(self, node, file): |
|
| 22 | """ |
||
| 23 | Generates the HTML code for an icon node. |
||
| 24 | |||
| 25 | :param sdoc.sdoc2.node.IconNode.IconNode node: The icon node. |
||
| 26 | :param file file: The output file. |
||
| 27 | """ |
||
| 28 | attributes = IconNode.get_definition(node.argument) |
||
| 29 | |||
| 30 | if attributes: |
||
| 31 | img_element = Html.generate_void_element('img', attributes) |
||
| 32 | file.write(img_element) |
||
| 33 | else: |
||
| 34 | NodeStore.error("There is no definition for icon with name '{}'".format(node.argument), node) |
||
| 35 | |||
| 39 |