Skip to content

Commit

Permalink
fix copying/pasting code token
Browse files Browse the repository at this point in the history
  • Loading branch information
jhchen committed Feb 28, 2020
1 parent 0c3b286 commit 9f9f8b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/syntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const TokenAttributor = new ClassAttributor('code-token', 'hljs', {
class CodeToken extends Inline {
static formats(node, scroll) {
while (node != null && node !== scroll.domNode) {
if (node.classList.contains(CodeBlock.className)) {
if (node.classList && node.classList.contains(CodeBlock.className)) {
return super.formats(node, scroll);
}
node = node.parentNode;
Expand Down

0 comments on commit 9f9f8b3

Please sign in to comment.