Add a comment to the output stream. Parameters ---------- comment : str Comment text.
(self, comment)
| 169 | return len(self.__tags) - 1 |
| 170 | |
| 171 | def comment(self, comment): |
| 172 | """ |
| 173 | Add a comment to the output stream. |
| 174 | |
| 175 | Parameters |
| 176 | ---------- |
| 177 | comment : str |
| 178 | Comment text. |
| 179 | """ |
| 180 | self.__flush() |
| 181 | self.__write(self.__indentation[:len(self.__tags)]) |
| 182 | self.__write(f"<!-- {_escape_comment(comment)} -->\n") |
| 183 | |
| 184 | def data(self, text): |
| 185 | """ |
no test coverage detected