Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix htmlPath issue #730

Merged
merged 1 commit into from

2 participants

@JacksonTian

Use /example/ as case.

output:

<a href=""></a> / <a href="/example">example</a> / <a href="/example/"></a>

Actually, following output more reasonable:

/ <a href="/example">example</a> /

This pull request fix this issue.

@jonathanong

can you rebase so we can see if the tests actually pass?

@JacksonTian

Rebased.

@jonathanong jonathanong merged commit 94a5840 into senchalabs:master

1 check passed

Details default The Travis CI build passed
@jonathanong

nice catch. i would have never noticed that.

@JacksonTian JacksonTian deleted the JacksonTian:html_path branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 15, 2013
  1. @JacksonTian

    Fix htmlPath issue

    JacksonTian authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/middleware/directory.js
View
2  lib/middleware/directory.js
@@ -154,7 +154,7 @@ function htmlPath(dir) {
var curr = [];
return dir.split('/').map(function(part){
curr.push(part);
- return '<a href="' + curr.join('/') + '">' + part + '</a>';
+ return part ? '<a href="' + curr.join('/') + '">' + part + '</a>' : '';
}).join(' / ');
}
Something went wrong with that request. Please try again.