Fixes bug introduced in e819866
Table of content was made unavailable regardless of whether one was provided by the page or not. This commit fixes this issue by making an unavailable TOC only if one is not provided by the web page, otherwise the TOC will be available.
This commit is contained in:
parent
90106df0f6
commit
3c942b4b8f
@ -63,10 +63,11 @@ Future<void> reorganizeHtml() async {
|
||||
linkifyImg();
|
||||
|
||||
// Add correct class to TOC
|
||||
final toc = (querySelector('#table-of-contents') ?? Element.div()
|
||||
..attributes['id'] = 'table-of-contents')
|
||||
..classes.add('dropdown')
|
||||
..innerText = "Table of Contents Unavailable";
|
||||
final toc = (querySelector('#table-of-contents') ??
|
||||
(Element.div()
|
||||
..attributes['id'] = 'table-of-contents'
|
||||
..innerText = "Table of Contents Unavailable"))
|
||||
..classes.add('dropdown');
|
||||
querySelector('#toc-drop').append(toc);
|
||||
|
||||
// Remove all <br> tags from HTML
|
||||
|
Reference in New Issue
Block a user