title: Enable copy and paste of highlighted code in Joomla wiki
body: <p>I'm looking at the tutorial pages covering the development of a component within Joomla. In the sections of code there are lines highlighted with a yellow background which indicate the lines of code which are new / changed from the previous step in the tutorial. An example is the large code block near the start of <a href="https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_a_view_to_the_site_part" rel="nofollow noreferrer">this page</a>.
  The problem is that when you try to copy these highlighted lines and paste them into your own code in your own editor (eg notepad++ or sublime), you just get all of those lines pasted into a single long line, instead of having them as separate lines as shown on the web page.</p>
  
  <p>I'd really like to amend the documentation so that you can continue to have the new lines highlighted, but also be able to copy and paste them into your own editor, but I can't see how.</p>
  
  <p>What I've discovered so far:
  According to <a href="https://docs.joomla.org/JDOC:Local_wiki_extensions#cite_note-1" rel="nofollow noreferrer">this wiki extensions page</a> the Joomla documentation wiki uses a <a href="https://www.mediawiki.org/wiki/Extension:SyntaxHighlight" rel="nofollow noreferrer">syntax highlighting extension</a> which can highlight sections of code.
  In the specific developer tutorial pages this is invoked through eg</p>
  
  <pre><code>&lt;source lang="php" highlight="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21"&gt;
  ...
  &lt;/source&gt;
  </code></pre>
  
  <p>However, this results in html where the line feeds are not actually present for those lines. Instead the CSS (in particular a class called 'xtra') converts those  elements using a display:block directive to get them to appear on separate lines.</p>
  
  <p>I've tried various things such as adding line feeds via html ampersands, changing the highlight attribute to give a range of pages (highlight="1-21"), trying to add line numbers, tried replicating what's shown on that syntax highlighting page above, etc but nothing has worked. Also I raised this question on the Joomla forum a couple of months ago, but haven't got any responses. </p>
  
  <p>Any suggestions?</p>
  
  <p>Thanks,
  Robbie</p>