projects
/
mdref
/
mdref
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix cli-server
[mdref/mdref]
/
public
/
index.js
diff --git
a/public/index.js
b/public/index.js
index 27e368a93ee728e229609384620d310d14213435..7c5a82c24043d6d5da63e41c3dfb5b1b631bd4aa 100644
(file)
--- a/
public/index.js
+++ b/
public/index.js
@@
-99,8
+99,8
@@
$(function() {
}
if (-1 !== (j = s.lastIndexOf("\\")) && s.substr(j+1,1) !== "n") {
t = s.substring(j+1);
}
if (-1 !== (j = s.lastIndexOf("\\")) && s.substr(j+1,1) !== "n") {
t = s.substring(j+1);
- if (!mdref.is_constant(t)) {
- return "<a href=\"" + s.replace(/\\/g, "/").replace(/::
|$
/, "#") + "\">";
+ 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 + "\">";
}
}
return "<a href=\"" + s.substring(0,j).replace(/\\/g, "/") + "#" + t + "\">";
}
@@
-130,7
+130,7
@@
$(function() {
$n.text().split(/([^a-zA-Z0-9_\\\$:]+)/).forEach(function(v) {
var t;
$n.text().split(/([^a-zA-Z0-9_\\\$:]+)/).forEach(function(v) {
var t;
- if ((t = mdref.type(v, nn))) {
+ if ((t = mdref.type(v
.replace(/:$/, "")
, nn))) {
a.push($(t).text(v));
} else if (a.length && a[a.length-1].nodeName === "#text") {
/* if we already have a text node and the next is also gonna be a text
a.push($(t).text(v));
} else if (a.length && a[a.length-1].nodeName === "#text") {
/* if we already have a text node and the next is also gonna be a text