You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: PDF annotations disappear after closing/reopening — The core issue was text matching failure in the textLayer
Root cause: Kangxi Radicals (U+2F00–U+2FD5) vs standard CJK (U+4E00–U+9FFF) encoding mismatch — PDF.js returns Kangxi Radicals for some Chinese text, while saved annotation text uses standard CJK characters
Fix: Use NFKC Unicode normalization for cross-encoding text matching
Fix: Remove space insertion between text nodes (broke CJK matching — Chinese text has no inter-word spaces)
Fix: Add retry mechanism with exponential backoff (500ms → 1s → 2s → 3s → 5s, max 6 attempts)
Fix: Async wait for textLayer to be rendered before matching
Community Review Compliance
All style.xxx = → setCssStyles() / setCssProps()
All eslint-disable comments have descriptions
All setTimeout → window.setTimeout
localStorage → plugin.settings
vault.delete → vault.trash
Security
Added data.json to .gitignore to prevent API key leaks