Skip to content

Commit

Permalink
fix: fix autolink when code is not enabled for editor (#4344)
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-qi committed Aug 18, 2023
1 parent af017d1 commit f2ac7b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/extension-link/src/helpers/autolink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export function autolink(options: AutolinkOptions): Plugin {
}))
// ignore link inside code mark
.filter(link => {
if (!newState.schema.marks.code) return true; // maybe code is not enabled for this editor

Check failure on line 90 in packages/extension-link/src/helpers/autolink.ts

View workflow job for this annotation

GitHub Actions / lint (16)

Expected { after 'if' condition

Check failure on line 90 in packages/extension-link/src/helpers/autolink.ts

View workflow job for this annotation

GitHub Actions / lint (16)

Extra semicolon
return !newState.doc.rangeHasMark(
link.from,
link.to,
Expand Down

0 comments on commit f2ac7b9

Please sign in to comment.