posting source here?

This should be easy.

Why when people post code is it mostly (perhaps always) double spaced? Is there some markdown that people can use? Is it the result of the extra CR from Windows?

It makes the code particularly hard to read don't you think?

Answers

  • Tobias
    Tobias admin
    edited May 2022

    I also dislike this but .. didn't spend time on figuring out what causes the issue.

    I guess it is related to CR/LF versus just using LF (or CR, I forgot what the other option usually is) and copying.

    I think as long as you paste into a code block, things should be fine...

  • tleylan
    tleylan ✭✭

    Hi Tobias,

    Are you affiliated with Photon? In my opinion someone should in fact look into what causes the issue and provide a solution. This doesn't occur in very many other support forums so it is solvable. It has an enormous impact on the readability and therefore usefulness of the support site.

    It is the 21st century. The days of "we don't know what does this" is pretty much over and telling the users to solve the problem isn't a solution.

  • Tobias
    Tobias admin
    edited May 2022

    I am affiliated with Photon, yes. We are a relatively small company and very focused on the products and less on the fluff surrounding that. Thanks for the lecture on support and the century we live in. We'll catch up as soon as the priority can be met.

    I actually answered your question though: Yes, there is some markup that can be used:

    get
    {
        return NetworkingClient.InLobby;
    }
    

    It's not as easy to find as I'd like but there is a solution: When entering text, there is a "paragraph" icon on the left side of the box (where the cursor is). A click shows more icons (again not self explaining) of which you'd use the quotations marks. The second layer of context menu shows the item "code block". Click it to insert a grey code box into the text field. It accepts code without blank lines (at least on Windows from Visual Studio copy paste) while the same paste will have blank lines.

    Update: Three backticks (```) followed by space are also starting a code block so there is also a macro.

    Come to think of it: The explanation is likely that Vanilla Forum is only supporting paragraphs but not line breaks. I will try to bug them about this again (I might quote your post partially to nudge them - it helped here).

  • tleylan
    tleylan ✭✭

    Well there you go there is markup available people just aren't aware perhaps and as such are not using it.