Testing the Code Copy Button

I’m trying to figure out why the Minimal Mistakes code copy button isn’t working on this site.

The below code all comes from the Pygments CSS Themes site.

Seems like the simpler version will work, but not the liquid tag version. And for Dataview, I need the longer version.

Simple Code Block (Backticks)

This seems to work just fine, thankfully! It’s a very useful addition to the Minimal Mistakes theme!

/**
 * Does a thing
 */
function helloWorld(param1, param2) {
  var something = 0;

  // Do something
  if (2.0 % 2 == something) {
    console.log('Hello, world!');
  } else {
    return null;
  }

  // @TODO comment
}

Jekyll Code Block (Liquid Tag)

This doesn’t seem to work, whether or not I have line numbers.

No Line Numbers

/**
 * Does a thing
 */
function helloWorld(param1, param2) {
  var something = 0;

  // Do something
  if (2.0 % 2 == something) {
    console.log('Hello, world!');
  } else {
    return null;
  }

  // @TODO comment
}

With Line Numbers

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/**
 * Does a thing
 */
function helloWorld(param1, param2) {
  var something = 0;

  // Do something
  if (2.0 % 2 == something) {
    console.log('Hello, world!');
  } else {
    return null;
  }

  // @TODO comment
}

Kudos

Did you enjoy this? Let me know: