(path, opts = {})
| 131 | }, |
| 132 | |
| 133 | fileHref(path, opts = {}) { |
| 134 | const params = new URLSearchParams(); |
| 135 | // `src` before `hl` so the two file URLs a reader shares differ in their |
| 136 | // first character after the path, not somewhere in the middle. |
| 137 | if (opts.source) params.set('src', '1'); |
| 138 | if (opts.line) params.set('hl', String(opts.line)); |
| 139 | return `#/file/${encodePath(path)}${query(params)}`; |
| 140 | }, |
| 141 | |
| 142 | mapHref(opts = {}) { |
| 143 | const params = new URLSearchParams(); |
no test coverage detected