fix cli-server
[mdref/mdref] / public / index.js
index 93128bf2542a5d1817b2111d742302c3bf081c36..7c5a82c24043d6d5da63e41c3dfb5b1b631bd4aa 100644 (file)
@@ -99,7 +99,7 @@ $(function() {
                        }
                        if (-1 !== (j = s.lastIndexOf("\\")) && s.substr(j+1,1) !== "n") {
                                t = s.substring(j+1);
-                               if (!mdref.is_constant(t)) {
+                               if (!mdref.is_constant(t) || s.match(/\\/).length <= 1) {
                                        return "<a href=\"" + s.replace(/\\/g, "/").replace(/::/, "#") + "\">";
                                }
                                return "<a href=\"" + s.substring(0,j).replace(/\\/g, "/") + "#" + t + "\">";