Inserts html in the file specified by 'fileName' at the location of the string 'htmlInsert'. :param fileName: name of the file :type fileName: str :param htmlInsert: HTML that must be inserted in this file :type htmlInsert: str
(fileName, htmlInsert)
| 120 | return html |
| 121 | |
| 122 | def _insertHTML(fileName, htmlInsert): |
| 123 | """ |
| 124 | Inserts html in the file specified by 'fileName' at the location of the |
| 125 | string 'htmlInsert'. |
| 126 | |
| 127 | :param fileName: name of the file |
| 128 | :type fileName: str |
| 129 | |
| 130 | :param htmlInsert: HTML that must be inserted in this file |
| 131 | :type htmlInsert: str |
| 132 | """ |
| 133 | if ini.notebook: |
| 134 | htmlInsert = HTML(htmlInsert) |
| 135 | else: |
| 136 | html = _readFile(fileName) |
| 137 | html = html.replace(_HTMLINSERT, htmlInsert + _HTMLINSERT) |
| 138 | _writeFile(fileName, html) |
| 139 | return htmlInsert |
| 140 | |
| 141 | def _readFile(fileName): |
| 142 | """ |
no test coverage detected