Skip to content

Commit

Permalink
Merge pull request #5492 from nextcloud/backport/5490/stable28
Browse files Browse the repository at this point in the history
[stable28] fix(LinkPicker): Don't open link picker inside code blocks
  • Loading branch information
mejo- authored Mar 15, 2024
2 parents 3bdd5e9 + a827a6d commit e9c7ee2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/extensions/LinkPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ export default Extension.create({
char: '/',
allowedPrefixes: [' '],
pluginKey: LinkPickerPluginKey,
allow: ({ state, range }) => {
const $from = state.doc.resolve(range.from)
return $from.parent.type.name !== 'codeBlock'
},
...suggestions(),
},
}
Expand Down

0 comments on commit e9c7ee2

Please sign in to comment.