projects
/
working
/
eg-antora.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6b57eb
)
minor optimization to relativize helper
author
Dan Allen
<dan@opendevise.com>
Fri, 9 Feb 2018 22:09:48 +0000
(15:09 -0700)
committer
Dan Allen
<dan@opendevise.com>
Fri, 9 Feb 2018 22:09:48 +0000
(15:09 -0700)
src/helpers/relativize.js
patch
|
blob
|
history
diff --git
a/src/helpers/relativize.js
b/src/helpers/relativize.js
index
84615c9
..
f9788c0
100644
(file)
--- a/
src/helpers/relativize.js
+++ b/
src/helpers/relativize.js
@@
-14,7
+14,7
@@
module.exports = (from, to) => {
if (from === to) {
return hash || (isDir(to) ? './' : path.basename(to))
} else {
- return path.relative(path.dirname(from + '.'), to) + (isDir(to) ? '/'
: '') + hash
+ return path.relative(path.dirname(from + '.'), to) + (isDir(to) ? '/'
+ hash : hash)
}
}