This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

  • Resolved

how to include code with line numbers

Hi, I would like to include some code with automatically generated line numbers so in later text as I type (before finally posting) I can refer to the line numbers. I looked at the help of </> option from which I understand that with all default options (which is all unchecked), I should expect the line numbers after I insert code but I don't see any line numbers. Thanks.

With default options:

        for (i = 0; i < 3; i++)
        {
            *dstEnd-- = *srcEnd--;
        }

With light box checked and everything else default:

        for (i = 0; i < 3; i++)
        {
            *dstEnd-- = *srcEnd--;
        }

  • Aha, after posting I see the line numbers but this feature is not very useful because I need to see the line numbers before I post so that I can refer them in the text as I write. Of course, the workaround is that I copy paste in some editor and see the line numbers there but it would be useful if this can be done when constructing the post as sometimes we embed pieces of code from some bigger code where line numbers are not going to be starting from 1 so it requires an additional step for workaround, an annoyance.
  • In reply to Piyush_:

    I agree, that would be useful but unfortunately is not currently available in the editor.  The current code insertion is provided by a plugin called SyntaxHighlighter.

    Bill Traynor
    E2E SysAdmin/DevOps

  • In reply to William Traynor:

    Can you follow up with the plugin development (is it possible to request features)? Has the e2e team surveyed other plug-ins that may have this feature (they may lack others but just have we looked for this one specifically)? Quoting code is common in forums and while this is not a debilitating feature (because of the simple workaround I mentioned), it is nice if we can see the line numbers while creating the post.
  • In reply to Piyush_:

    Hi , thanks for the feedback. The syntaxhighlighter/editor are a core part of the software that runs E2E. Upgrades will be made as part of the overall software upgrade which is scheduled for the near future.

    Bill Traynor
    E2E SysAdmin/DevOps

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Related