diff --git a/src/copy-inline-code-view-plugin.ts b/src/copy-inline-code-view-plugin.ts index f89dd0c..8d68978 100644 --- a/src/copy-inline-code-view-plugin.ts +++ b/src/copy-inline-code-view-plugin.ts @@ -57,7 +57,7 @@ class CopyInlineCodeViewPlugin implements PluginValue { node.from, node.to ); - if (shouldExclude(codeText, filters)) { + if (shouldExclude(codeText, filters) || node.to + 1 > view.state.doc.length) { return; } builder.add(