Per the subject line, selecting code also selects the line number. This makes it hard to use the code you have copied. the solution here doesn't seem to work. I am using syntax hilight version number: 2.0 (822ede6) 22:24, 20 February 2016. I am using media wiki version 1.27.0-alpha (5353260).
This behavior is present when using latest version of chrome ( 49.0.2623.87 (64-bit)) and firefox (45.0.1).