Skip to content

Commit 3ca4a17

Browse files
committed
fix: trim content of TOC elements
This is necessary in order to avoid creating <br> elements in the table of contens elements.
1 parent 1c3ada9 commit 3ca4a17

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/frontend/js/classes/table-of-content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export default class TableOfContent {
193193

194194
const linkWrapper = $.make('li', this.CSS.tocElementItem);
195195
const linkBlock = $.make('a', null, {
196-
innerText: tag.innerText,
196+
innerText: tag.innerText.trim(),
197197
href: `${linkTarget}`,
198198
});
199199

0 commit comments

Comments
 (0)