Commit 3f4a0ab33dbb1adb4f5983e2b437330d2eb82a06
Fix linkifying private blob links
cel committed on 7/31/2018, 6:49:03 PMParent: 8fd6613c73b3cc03e594c3a4ad89e3303cfd5131
Files changed
lib/render.js | changed |
lib/render.js | |||
---|---|---|---|
@@ -227,10 +227,14 @@ | |||
227 | 227 … | var parts = href.split('#') | |
228 | 228 … | var hash = parts.shift() | |
229 | 229 … | var key = parts.shift() | |
230 | 230 … | var fragment = parts.join('#') | |
231 … | + parts = hash.split('?') | ||
232 … | + hash = parts.shift() | ||
233 … | + query = parts.join('?') | ||
231 | 234 … | if (!u.isRef(hash)) return false | |
232 | 235 … | return this.opts.blob_base + hash | |
236 … | + + (query ? '?' + query : '') | ||
233 | 237 … | + (key ? encodeURIComponent('#' + key) : '') | |
234 | 238 … | + (fragment ? '#' + fragment : '') | |
235 | 239 … | case '#': return this.opts.base + 'channel/' + | |
236 | 240 … | encodeURIComponent(href.substr(1)) | |
Built with git-ssb-web