New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Clicking a PDF annotation link now causes an immediate jump to the annotation in markdown-source-view #258
Conversation
…notation in markdown-source-view
It looks like clicking links in the markdown source view of the annotation note still does not work. Is this supposed to be covered by the PR? Some other notes:
|
f4e4014
to
856a29b
Compare
Hey @elias-sundqvist, thank you for your reply. This PR doesn't cover clicking links in the markdown source view of the annotation note.
I moved some of the logic from src/main.tsx to src/sourceViewObserver.tsx
bingo
I can't think of a solution other than useing mutation observers test file here |
To clarify on 2. I think this is already done automatically by |
Hey @elias-sundqvist, I deleted handling the events manually |
It looks like @HardwayLinka resolved all concerns, so I'm going to merge it and release as 0.2.9 🚀 |
const activeLeaf = this.plugin.app.workspace.getActiveViewOfType(MarkdownView); | ||
if (!activeLeaf) return; | ||
|
||
const regex2Find = /(?<=[\[]{2})[^\]]*(?=[\]]{2})/gm; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun fact. Plugin didn't start on iOS(#284) because of this line🤡
Turned out it because Safari doesn't support ?<=
and throws syntax error. I didn't find other way to exclude [[
with regex and added removing it with hrefLink.substring(2)
.
Hey, @aladmit, @jonasmerlin, @elias-sundqvist and @rdimaio
Deleted resources/cdn.hypothes.is/hypothesis/build on the basis of #257
ps. Use main.js and manifest.json in 0.2.7patched to test without building the project