Hey Linux masters

How do I add coded snippets to posts and replies, without it turning into a one liner

Take this simple function for instance:

simple database cleaner

function dbclean() { profile-cleaner l profile-cleaner i }

how to make it look like the same sample below without the line spaces. Ive added " " to the hash so you can see what I want.

“#” simple database cleaner

function dbclean() {

profile-cleaner l

profile-cleaner i

}

I thought it would be a simple matter of looking at markup language options to contain the code snippet to make it look like in my text editor.

  • communism@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 days ago

    Markdown is a convention, and then there are Markdown standards in attempts to standardise all the different flavours. I suppose it’s “open source” in the sense that e.g. CommonMark is CC licensed akin to foss software licences, but it’s a specification, not a program with source code.

    In any case it has little to do with Linux.