Click here to Skip to main content
15,912,897 members

Bugs and Suggestions

   

General discussions, site bug reports and suggestions about the site.

For general questions check out the CodeProject FAQs. To report spam and abuse Head to the Spam and abuse watch. If you wish to report a bug privately, especially those related to security, please email webmaster@codeproject.com

 
GeneralRe: Please stop with the pointless QA edits already! Pin
Richard Deeming6-Nov-23 3:52
mveRichard Deeming6-Nov-23 3:52 
GeneralRe: Please stop with the pointless QA edits already! Pin
Greg Utas6-Nov-23 4:39
professionalGreg Utas6-Nov-23 4:39 
GeneralRe: Please stop with the pointless QA edits already! Pin
Richard MacCutchan6-Nov-23 4:57
mveRichard MacCutchan6-Nov-23 4:57 
GeneralRe: Please stop with the pointless QA edits already! Pin
RedDk6-Nov-23 6:34
RedDk6-Nov-23 6:34 
GeneralRe: Please stop with the pointless QA edits already! Pin
Richard MacCutchan6-Nov-23 9:33
mveRichard MacCutchan6-Nov-23 9:33 
GeneralRe: Please stop with the pointless QA edits already! Pin
RedDk6-Nov-23 12:38
RedDk6-Nov-23 12:38 
GeneralRe: Please stop with the pointless QA edits already! Pin
Sean Ewington6-Nov-23 10:13
staffSean Ewington6-Nov-23 10:13 
SuggestionRe: Please stop with the pointless QA edits already! Pin
Nelek6-Nov-23 8:06
protectorNelek6-Nov-23 8:06 
QuestionOnly an observation ... Pin
0x01AA5-Nov-23 3:52
mve0x01AA5-Nov-23 3:52 
AnswerRe: Only an observation ... Pin
Chris Maunder5-Nov-23 9:15
cofounderChris Maunder5-Nov-23 9:15 
SuggestionCoral module on docker needs curl Pin
VavoVavo1-Nov-23 11:01
VavoVavo1-Nov-23 11:01 
SuggestionRe: Coral module on docker needs curl Pin
Richard Deeming1-Nov-23 22:36
mveRichard Deeming1-Nov-23 22:36 
SuggestionHas the articles’ layout been modified? Pin
FredAu28-Oct-23 23:41
FredAu28-Oct-23 23:41 
GeneralRe: Has the articles’ layout been modified? Pin
Chris Maunder30-Oct-23 3:30
cofounderChris Maunder30-Oct-23 3:30 
GeneralRe: Has the articles’ layout been modified? Pin
Jo_vb.net30-Oct-23 6:21
mvaJo_vb.net30-Oct-23 6:21 
GeneralRe: Has the articles’ layout been modified? Pin
Chris Maunder30-Nov-23 5:20
cofounderChris Maunder30-Nov-23 5:20 
GeneralRe: Has the articles’ layout been modified? Pin
Richard Deeming30-Nov-23 21:47
mveRichard Deeming30-Nov-23 21:47 
GeneralRe: Has the articles’ layout been modified? Pin
Chris Maunder1-Dec-23 3:54
cofounderChris Maunder1-Dec-23 3:54 
QuestionA question for 'Technical Blog' publishing Pin
0x01AA28-Oct-23 7:32
mve0x01AA28-Oct-23 7:32 
AnswerRe: A question for 'Technical Blog' publishing Pin
RedDk28-Oct-23 7:56
RedDk28-Oct-23 7:56 
GeneralRe: A question for 'Technical Blog' publishing Pin
0x01AA28-Oct-23 9:10
mve0x01AA28-Oct-23 9:10 
GeneralRe: A question for 'Technical Blog' publishing Pin
RedDk28-Oct-23 9:26
RedDk28-Oct-23 9:26 
AnswerRe: A question for 'Technical Blog' publishing Pin
Richard Deeming29-Oct-23 23:11
mveRichard Deeming29-Oct-23 23:11 
AnswerRe: A question for 'Technical Blog' publishing Pin
Sean Ewington30-Oct-23 5:18
staffSean Ewington30-Oct-23 5:18 
SuggestionCode block line numbers Pin
Richard Deeming27-Oct-23 4:42
mveRichard Deeming27-Oct-23 4:42 
It is currently possible to add line numbers to a code block by adding the linecount="on" attribute to the <pre> element.
  1  Line 1
  2  Line 2
  3  Line 3
These line numbers are inserted directly into the rendered HTML:
HTML
<span class="code-linenumber">  1  </span>Line 1
<span class="code-linenumber">  2  </span>Line 2
<span class="code-linenumber">  3  </span>Line 3
As a result, if you try to select part of the code block to copy, you end up including the line numbers:

The only option is to use the "copy" icon at the top of the script block to copy the entire block without line numbers, then use a text editor to trim it down to just the part you wanted to copy.

If instead you added the line numbers using the ::before pseudo-element[^], they would not be selectable. You would be able to select and copy any part of the code block without including the line numbers. And the "copy" script wouldn't need to strip the line numbers out.

You could even use CSS counters[^] to automatically generate the line numbers. Smile | :)

For example:
HTML
<pre data-linecount="True" style="--line-start:10;--line-increment:10;"><span class="code-linenumber"></span>Line 1
<span class="code-linenumber"></span>Line 2
<span class="code-linenumber"></span>Line 3
</pre>
CSS
pre[data-linecount="True"]{
    --line-initial: calc(var(--line-start, 1) - var(--line-increment, 1));
    counter-reset: line-number var(--line-initial, 0);
    
    /*
     Throw in some gratuitous CSS Nesting, now that it's widely supported:
     https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_nesting/Using_CSS_nesting
    */
    & .code-linenumber::before {
        counter-increment: line-number var(--line-increment, 1);
        content: counter(line-number);
        display: inline-block;
        text-align: right;
        width: 2em;
        margin-right: .5em;
        opacity: 0.5;
    }
}
Demo[^]



The only potential issue would be determining an appropriate width for the line number element, so that it doesn't push short blocks over too far, but leaves enough room for the occasional massive wall-o-text code dump.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Flags: AnsweredUnder consideration

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.