add this to the preamble:
\usepackage{textcomp}
add this to the code listing advanced options:
upquote=true
Seems I can copy and paste the code correctly now. I will report if issues!
\usepackage{textcomp}
upquote=true
NEW: TikZ book now 40% off at Amazon.com for a short time.