(id, opts = {})
| 121 | /** The `codegraph ui` address space: the hash is the route. */ |
| 122 | export const hashNavigation: NavigationDriver = { |
| 123 | symbolHref(id, opts = {}) { |
| 124 | const params = new URLSearchParams(); |
| 125 | if (opts.trail) params.set('t', opts.trail); |
| 126 | if (opts.line) params.set('hl', String(opts.line)); |
| 127 | // No id: the tab itself. `#/s` rather than `#/s/` so the segment filter |
| 128 | // cannot read an empty id back out of it. |
| 129 | if (!id) return `#/s${query(params)}`; |
| 130 | return `#/s/${encodePath(id)}${query(params)}`; |
| 131 | }, |
| 132 | |
| 133 | fileHref(path, opts = {}) { |
| 134 | const params = new URLSearchParams(); |
no test coverage detected