Open the tag in HTML output and copy the node attributes if there are any.
(self, node, end=False)
| 569 | self.TEXTBOX_CLASS(bs, parent=self.galley) |
| 570 | |
| 571 | def htmlNode(self, node, end=False): |
| 572 | """Open the tag in HTML output and copy the node attributes if there are any.""" |
| 573 | htmlTag = u'<%s' % node.tag |
| 574 | attrs = [] |
| 575 | for name, value in node.items(): |
| 576 | if name == 'src' and value.startswith('docs/'): |
| 577 | # Exception hack to bridge the .md --> img URL. |
| 578 | value = value[5:] |
| 579 | attrs.append('%s="%s"' % (name, value)) |
| 580 | if attrs: |
| 581 | htmlTag += u' '+u' '.join(attrs) |
| 582 | if end: |
| 583 | htmlTag += '/' |
| 584 | htmlTag += '>' |
| 585 | self.append(htmlTag) |
| 586 | |
| 587 | def _htmlNode(self, node): |
| 588 | """Close the html tag of node.""" |
no test coverage detected