Commit 33982ab
committed
Render KOReader ribbon page bookmarks as "Bookmarked"
KOReader's ribbon (corner-tap) page bookmarks live alongside text
highlights in the same `annotations` array, distinguished by the
absence of a `pos0`/`pos1` selection range. KOReader auto-fills the
`text` field with "in <chapter>" for those rows so they render as
something in its own UI.
The plugin was passing that auto-text straight into the highlight
renderer, producing blocks like:
> in Chapter 4: Natural and Spiritual Freedom
chapter:: Chapter 4: Natural and Spiritual Freedom
page:: 360
instead of the canonical bookmark shape:
> Bookmarked
chapter:: Chapter 4: Natural and Spiritual Freedom
page:: 360
Detect the missing selection range in the parser and clear `text` so
the existing renderer's "empty text → page bookmark" path takes over.
Same fix on the legacy `bookmarks` array; also dropped the wrong
`b.notes` fallback that previously mirrored auto-text into `text`.1 parent 9602abc commit 33982ab
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
153 | | - | |
| 153 | + | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
165 | 178 | | |
166 | 179 | | |
167 | 180 | | |
| |||
0 commit comments