I'm having an hard time trying to insert code in a GitHub comment.
This:
becomes this:
and this:
becomes this:
I'm astonished to have such a problems in a website specialized in collaborating (thus discussing) on programming code.
What's the solution?
CodePudding user response:
You keep trying to use single-line (also known as inline) markdown code syntax:
my code is `print("hello, world")`
While you should be using the multi-line variant:
my code is:
```
def foo():
print("hello, world")
```
Read up about Markdown here.