title: HTML, disable highlighting/copying prompts in code listings
body: <p>I'd like to put some code listings on a web page. Sometimes they're lists of commands to be copied. I'd like to show prompts in those code listings, yet make them somehow non-copyable, so that when user copies the text, he won't copy the prompts by mistake.</p>
  
  <p>Note that I don't want to “protect” the content, I just want to help user not make mistake.</p>
  
  <p>I tried to apply <a href="https://stackoverflow.com/questions/826782/css-rule-to-disable-text-selection-highlighting">CSS rules to disable text selecting</a>, but it seems that even then if you highlight and copy multiple commands at once, prompts are copied together with the text—at least this is what I see in Google Chrome. <a href="http://jsfiddle.net/4TXJs/3/" rel="nofollow noreferrer">Try for yourself</a>, what gets into my clipboard is:</p>
  
  <pre><code>def hello(text):
     ....:     print "Hello {}!".format(text)
     ....:     print "Bye, cruel {}!".format(text)
     ....: 
  
  In [24]: def foo(bar):
     ....:     print 'Another helper function.'
     ....:     bar.boom()
     ....: 
  </code></pre>
  
  <p>So, how to do it right?</p>