Remove call to querySelector, remove all br tags from HTML

This commit is contained in:
Lucien Cartier-Tilet 2020-05-04 16:06:53 +02:00
parent ccfd0822b0
commit 41d368e09c
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -195,7 +195,7 @@ Future<void> reorganizeHtml() async {
content.insertAdjacentElement('beforeBegin', header);
final subtitle = querySelector('.subtitle');
if (subtitle != null) {
querySelector('header').append(subtitle);
header.append(subtitle);
}
});
@ -205,4 +205,7 @@ Future<void> reorganizeHtml() async {
// Add correct class to TOC
querySelector('#toc-drop')
.append(querySelector('#table-of-contents')..classes.add('dropdown'));
// Remove all <br> tags from HTML
querySelectorAll('br').forEach((br) => br.remove());
}