https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292009-11-23T13:30:08ZRedmineRedmine - Feature #4267: <code> block improvementshttps://www.redmine.org/issues/4267?journal_id=123382009-11-23T13:30:08ZMischa The Evil
<ul></ul><p>+10 from me on this one. I actually still had to file this issue myself... Thanks for doing it for me :)</p>
<p>These options really would make syntax-highlighting more useable IMHO.</p> Redmine - Feature #4267: <code> block improvementshttps://www.redmine.org/issues/4267?journal_id=155972010-04-01T18:21:53ZKornelius Kalnbach
<ul></ul><p>It seems to me that <code>:line_number_start</code> and <code>highlight_lines</code> are most useful. We should focus on them, to keep the highlighter plugin API simple, and ensure that other highlighters can adapt.</p> Redmine - Feature #4267: <code> block improvementshttps://www.redmine.org/issues/4267?journal_id=156102010-04-02T23:02:07ZWilliam Baum
<ul></ul><p>For me, the inability to cut and paste code without the line numbers is a deal-breaker. Furthermore, without representing file line numbers, I don't see how they add value. While the CODE blocks are prettier, the plain PRE blocks are better for exchanging code snippets, simply due to the line numbers.</p>
<p>In terms of usefulness and ease of implementation, the CodeRay features I'd like to see supported are:</p>
<ol>
<li>Suppress the line numbers<br /><pre>
:line_numbers => nil
</pre></li>
<li>Use the table method:<br /><pre>
:line_numbers => :table
</pre></li>
<li>Use actual file line numbers:<br /><pre>
:line_number_start
</pre></li>
</ol>
<p>I did experiment with changing the line numbering method in <code>lib/redmine/syntax_highlighting.rb</code>.</p>
<p><code>nil</code> works fine and does suppress the line numbers. <code>:table</code> will require some changes to the style declarations to get working properly, but would fix the clipboard issues. The samples on the CodeRay site that cut and paste well seem to be using the <code>:table</code> method.</p> Redmine - Feature #4267: <code> block improvementshttps://www.redmine.org/issues/4267?journal_id=158752010-04-14T04:08:58ZEric Thomas
<ul></ul><p>William Baum wrote:</p>
<blockquote>
<p>For me, the inability to cut and paste code without the line numbers is a deal-breaker. Furthermore, without representing file line numbers, I don't see how they add value. While the CODE blocks are prettier, the plain PRE blocks are better for exchanging code snippets, simply due to the line numbers.</p>
<p>In terms of usefulness and ease of implementation, the CodeRay features I'd like to see supported are:</p>
<ol>
<li>Suppress the line numbers<br />[...]</li>
<li>Use the table method:<br />[...]</li>
<li>Use actual file line numbers:<br />[...]</li>
</ol>
<p>I did experiment with changing the line numbering method in <code>lib/redmine/syntax_highlighting.rb</code>.</p>
<p><code>nil</code> works fine and does suppress the line numbers. <code>:table</code> will require some changes to the style declarations to get working properly, but would fix the clipboard issues. The samples on the CodeRay site that cut and paste well seem to be using the <code>:table</code> method.</p>
</blockquote>
<p>William, if you get a chance please see my patch at <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Ability to select only source code without line numbers (Closed)" href="https://www.redmine.org/issues/3382">#3382</a>. Thanks.</p> Redmine - Feature #4267: <code> block improvementshttps://www.redmine.org/issues/4267?journal_id=292292011-05-26T15:04:25ZLing Li
<ul></ul><p>+1</p>
<p>I like William Baum's suggestion in note#3 a lot! Would this be put into some planned version?</p>
<p>William Baum wrote:</p>
<blockquote>
<p>For me, the inability to cut and paste code without the line numbers is a deal-breaker.</p>
</blockquote>
<p>Strongly agree!</p> Redmine - Feature #4267: <code> block improvementshttps://www.redmine.org/issues/4267?journal_id=309852011-07-22T09:06:06ZAnthony Gerrard
<ul></ul><p>Generally +1</p>
<blockquote>
<p>For me, the inability to cut and paste code without the line numbers is a deal-breaker.</p>
</blockquote>
<p>+10 on this</p>