Open nichtich opened 3 years ago
If we do bring in something like this, my sense is that it should follow the scroll-to-text approach https://wicg.github.io/scroll-to-text-fragment/
Yeah scroll-to-text is good -
To add a fragment directive to a URL like https://example.com, a fragment must first be appended to the URL: https://example.com#:~:text=foo. e.g. https://example.org/#test:~:text=foo will be parsed such that the fragment is the string "test" and the fragment directive is the string "text=foo".
Could specify a search? eg #search="foo bar"
GitHub lets you reference lines and line ranges -
https://github.com/subconsciousnetwork/subtext/blob/dbbf178fe9f3480c052b461fcb1752829c9b7df9/parsers/subtext.py#L8
https://github.com/subconsciousnetwork/subtext/blob/dbbf178fe9f3480c052b461fcb1752829c9b7df9/parsers/subtext.py#L12-L16
and github renders those as transclusions.
I kind of like "line" instead of "L", but referencing lines isn't as useful as text or search anyway, e.g. if you're using a "live" link instead of a "static" one.
The issue of deep links has been brought up but not discussed yet in combination with multilinks. In short a deep link consists of
The content locator could best be specified separated by
#
as URI Fragment. Note that at least` (space),
|, and
%` in URI Fragments must be escaped to allow splitting label and multiple links.An example: