Commit c870aa737762e1030c802a7cdddd3a9c494d279b
Handle #fragments in markdown links
cel committed on 10/19/2016, 1:34:14 AMParent: 5b26576be7305fde8067815b930a8f0ff182f966
Files changed
lib/markdown.js | changed |
lib/markdown.js | ||
---|---|---|
@@ -11,9 +11,9 @@ | ||
11 | 11 … | return u.encodeLink(href) |
12 | 12 … | if (/^[0-9a-f]{40}$/.test(href) && this.options.repo) |
13 | 13 … | return u.encodeLink([this.options.repo.id, 'commit', href]) |
14 | 14 … | if (this.options.repo && this.options.rev && this.options.path |
15 | - && !url.parse(href).host) | |
15 … | + && !url.parse(href).host && href[0] !== '#') | |
16 | 16 … | return path.join('/', encodeURIComponent(this.options.repo.id), |
17 | 17 … | 'blob', this.options.rev, this.options.path.join('/'), href) |
18 | 18 … | return href |
19 | 19 … | } |
Built with git-ssb-web