From eba3d3aa3caf4c768228459559b756dbd7f1cec4 Mon Sep 17 00:00:00 2001 From: Joaquin Casares Date: Sun, 24 Mar 2013 22:36:31 -0500 Subject: [PATCH] Fix colon-space hashes --- src/javascripts/jquery.tocify.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/javascripts/jquery.tocify.js b/src/javascripts/jquery.tocify.js index d39287c..147f51f 100644 --- a/src/javascripts/jquery.tocify.js +++ b/src/javascripts/jquery.tocify.js @@ -358,6 +358,11 @@ hashValue = hashValue.replace(/--/g, "-"); } + // fix colon-space instances + while (hashValue.indexOf(":-") > -1) { + hashValue = hashValue.replace(/:-/g, "-"); + } + } else if (typeof hashGeneratorOption === "function") { // call the function