summaryrefslogtreecommitdiff
path: root/public/vendor/md-toc.js (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-11-19Fix ToC breaking documents with empty h* elementsSheogorath1-4/+4
Right now, the ToC has an undefined variable i that was an index in the original ToC code. Since the major rewrite in 4fe062085324c50f2cfa062258559cf31858ef5f it's a recursive function without this index. The variable `i` was wrongly copied into its current place from the old code. This patch replaces the variable `i` with the index of the header element. Fix the undefined variable problem. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-07-04ToC: Some HTML improvements and style fixesSheogorath1-6/+16
The ToC generated broken HTML with unclosed `<li>` tags. This got fixed as well as some minor optimisation and adding list elements for the subentries so the elements appear in the ToC while scrolling. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-07-04Ignore h6 headersSheogorath1-1/+1
h6 headers are used for tags in CodiMD. So we should ignore them for the ToC generation. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-07-04Refactor generation of ToCSheogorath1-45/+55
This replaces the existing iterative implementation of the ToC generation with an recursive one. This also solves the problem of skipped headers which causes wrong leveling of them. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-03-26Add title attribute in table of contentsSheogorath1-1/+2
Right now the full title of an element is may not shown as the space of the ToC is limited. With this path it'll be shower on hover and this way provide more useful information. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2017-04-18Remove executable permission from static filesPeter Dave Hello1-0/+0
2017-03-09Use JavaScript Standard Style (part 2)BoHong Li1-110/+104
Fixed all fail on frontend code.
2016-11-28Fix header id and text might affects by mathjax tagsWu Cheng-Han1-1/+2
2016-11-14Remove uesless executable permission for static filesPeter Dave Hello1-0/+0
2015-12-20Added support of toc syntaxWu Cheng-Han1-2/+9
2015-07-02Jump to 0.3.1Wu Cheng-Han1-0/+121