diff --git a/lib/tocify.js b/lib/tocify.js index e369b7e..6167a1d 100644 --- a/lib/tocify.js +++ b/lib/tocify.js @@ -138,12 +138,12 @@ class Tocify { // `anchor`: Adds anchor (if needed) assign(item, anchorize(item.source)) - // `source`: Takes care of relative (../) paths - assign(item, absolutify(item.source, this.docs)) - // `source`: Handle OS specific paths assign(item, pathify(item.source)) + // `source`: Takes care of relative (../) paths + assign(item, absolutify(item.source, this.docs)) + if (this.sources[item.source]) { // If this same item exists before, reuse its URL and stuff const previous = this.sources[item.source]