@@ -35,64 +35,3 @@ last value of the tag.
35
35
### Context
36
36
Clients MAY include a ` context ` tag, useful when the highlight is a subset of a paragraph and displaying the
37
37
surrounding content might be beneficial to give context to the higlight.
38
-
39
- ### Ranges
40
- Clients MAY include ` range ` tags with the start/end indexes of where the highlight begins and finishes within
41
- the referenced article/tagged-event.
42
-
43
- ```
44
- [ "range", <start-index>, <end-index> ]
45
- ```
46
-
47
- Additionally a range with ` context ` as the third value of the tag MAY be added to indicate the begin/finish indexes
48
- of the highlight within the included ` context ` tag.
49
-
50
- ```
51
- [ "range", <start-index>, <end-index>, "context" ]
52
- ```
53
-
54
- #### Text-based nostr events' highlights
55
-
56
- Highlights of Nostr events SHOULD use the range index of the content as-is
57
- (e.g. NIP-23 articles include the markdown instead of computing the index from the rendered markdown).
58
-
59
- ```
60
- [ "range", 3000, 3042 ] # highlight begins at index position 3000 of the tagged event's `.content`
61
- [ "range", 42, 84, "context" ] # highlight begins at index position 42 of the `context` tag's value
62
- ```
63
-
64
- #### Non-text-based nostr events' highlights
65
-
66
- A ` kind:9802 ` event that tags a NIP-94 event which includes a video or audio file can use ranges to
67
- indicate the start/end time position in seconds.
68
-
69
- #### Ranges in URL highlights
70
-
71
- When creating a highlight from a URL the range should be expressed over
72
- the extracted plain text of the formatted content (e.g. rendered HTML instead of including the HTML markup);
73
- this helps make finding the correct indexes easier on websites with markup variations on each render.
74
-
75
- e.g. ` <html><body>hello, world</body></html> `
76
-
77
- Tagging ` hello, world ` would result in using a range tag like ` ["range", 0, 12 ] ` .
78
-
79
- Text extraction (i.e. translation from non-plain text medium like HTML or PDF) is highly subjective and the value
80
- of the range should be carefully interpreted by the different clients that support this.
81
-
82
- ``` json
83
- {
84
- "created_at" : 1682707885 ,
85
- "content" : " while allowing creators to simply keep doing what they’re doing. Creators don’t need to be blatant shills for brands" ,
86
- "tags" : [
87
- [ " r" , " https://footstr.com/zapvertise/" ],
88
- [ " p" , " c48e29f04b482cc01ca1f9ef8c86ef8318c059e0e9353235162f080f26e14c11" , " wss://relay.url" , " author" ],
89
- [ " context" , " The Nostr zapvertising model creates a truly free market for advertisers, while allowing creators to simply keep doing what they’re doing. Creators don’t need to be blatant shills for brands, they just have to create high quality content people find valuable, and companies will naturally want to zapvertise on their posts." ]
90
- [ " range" , 3916 , 4032 ],
91
- [ " range" , 74 , 190 , " context" ],
92
- ],
93
- "kind" : 9802 ,
94
- "pubkey" : " fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52" ,
95
- "id" : " 59e5887a3cdf32d5f11edf9b8cd098c620d278514b2edde3e6d1ba8a541d262c" ,
96
- "sig" : " f2d15b8bc2csf6d198350f8df0a31dcf66d7c32ec9c54e6b3f102d579370b7de9d164d70350a5b32a2911db3b124e972bafa9a1bc8fd60c1e338903d2f6306b0"
97
- }
98
- ```
0 commit comments