Skip to content

Commit

Permalink
fix: after custom resolver disabled, wikilink still use dendron format
Browse files Browse the repository at this point in the history
  • Loading branch information
levirs565 committed Aug 22, 2023
1 parent 403333b commit aa542e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Fix:

- When ref target a header that header after it have lower level, ref content start from the header
and end in header with same level
- When open link and ref with heading subpath, document not scrolled into start heading
- When open link and ref with heading subpath, document not scrolled into start heading
- After custom resolver disabled, wikilink still use Dendron format (Source mode and live mode)

## 1.2.2

Expand Down
9 changes: 8 additions & 1 deletion src/custom-resolver/link-ref-clickbale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,12 @@ export class LinkRefClickbale implements PluginValue {
}
}

destroy(): void {}
destroy(): void {
if (this.getClickableTokenAtOrig) {
const editor = this.view.state.field(editorInfoField).editor;
if (editor) {
editor.getClickableTokenAt = this.getClickableTokenAtOrig;
}
}
}
}

0 comments on commit aa542e7

Please sign in to comment.