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.

"Source Code" tool with new E2E software can make the code unreadable by removing line endings, and there is no longer any syntax highlighting

In https://e2e.ti.com/support/microcontrollers/other/f/other-microcontrollers-forum/984404/ek-tm4c1294xl-adc-dma-with-ethernet-task-stop-issue/3637057#3637057 the post of some code from a different user got mangled by removing all the line endings.

I can repeat the same issue using the Opera Browser under Linux. The following screenshot showed the code correctly formatted in the "Source Code" window:

But when pressed Ok on the dialog the code is mangled:

//***************************************************************************** // // Configure the UART and its pins. This must be called before UARTprintf(). // //***************************************************************************** void ConfigureUART(void) { // // Enable the GPIO Peripheral used by the UART. // MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); // // Enable UART0 // MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0); // // Configure GPIO Pins for UART mode. // MAP_GPIOPinConfigure(GPIO_PA0_U0RX); MAP_GPIOPinConfigure(GPIO_PA1_U0TX); MAP_GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1); // // Initialize the UART for console I/O. // UARTStdioConfig(0, 115200, g_ui32SysClock); }

I haven't yet determined if the problem is OS or Browser specific.

Also, with the old E2E forum software when source code was inserted you had the option to select the language which added syntax highlighting which made the code more readable. The new E2E forum software no longer seems to support syntax highlighting for source code. 

  • Former Member
    0 Former Member

    Hello ,

    In you screenshot, you seem to be missing the language chooser in the Insert Code portion of the editor.  You should be seeing the following:

    Do you not see that?

    Thanks

    Bill

  • Do you not see that?

    I have just tried the following browsers under Ubuntu 18.04 and none of them are showing the Language chooser:

    • Opera
    • FireFox
    • Chrome

    Will find a Windows PC to try.

  • Bill,

    Due to the time difference, I am jumping in for Chester. Did you pull that from the "Insert" pulldown. I only have these options:

    No "Insert" -> "Code" option.

    What I think he tried to use is from the "Tools" drop down. "Tools" -> "Source code". That looks like HTML source to me.

  • Just tried Microsoft Edge under Windows 10 and also can't see the Language chooser in that browser.

    In you screenshot, you seem to be missing the language chooser in the Insert Code portion of the editor.

    Also, when I look at the Insert Code editor there is the "Wrap long lines" tickbox at the the bottom left which wasn't shown in your screenshot:

    I have made sure to clear the browser's cache and cookies but that doesn't change the behavior of the source code editor.

  • What I think he tried to use is from the "Tools" drop down. "Tools" -> "Source code".

    Yes, that is what I tried as was the only option related to "Source code" I could find.

    Bill, I assume you are using the "live" forum, and not some test system when you got the source code editor with the language chooser?

  • Former Member
    0 Former Member in reply to Chester Gillon

    OK, I've enabled the Full Editor, which includes the Insert -> Code functionality but it hasn't turned up yet in the live site.  I've asked the Vendor to recycled the servers to pick up that change.  Please standby.

    Thanks

    Bill

  • Full Editor doesn't work - gives blank screen

    formatting as <source code> also doesn't work - I don't see the pull-down to choose which type of code...

  • Former Member
    +1 Former Member in reply to Mechi Fendel

    Hello,

    This is a known problem that we're working to resolve.  Please stand by.

    Thanks

    Bill

  • #include <stdio.h>
    
    void test_code_editor (void)
    {
        const char *const message =
                "The source code editor is now showing up under Insert -> Code in the live forum\n"
                "And what does the code editor do with a link:\n"
                "https://e2e.ti.com/support/site-support/f/site-support-forum/984561/source-code-tool-with-new-e2e-software-can-make-the-code-unreadable-by-removing-line-endings-and-there-is-no-longer-any-syntax-highlighting\n";
    
        printf ("%s", message);
    }