Reputation: 340
I have a short README.md where I have problems in formatting.
https://github.com/wojciehm/macOS-.bash_profile-cron-backup
I can't paste the raw code because SO wants to format it as well.
Upvotes: 1
Views: 961
Reputation: 5107
There are some examples in the GitHub Flavored Markdown docs that cover this, but the short version is that you simply need to indent the code block.
For example:
4. We commit all files with comment from script execution time: ` "generated files on date +'%Y-%m-%d %H:%M:%S'";`
`git commit -a -m "generated files on date +'%Y-%m-%d %H:%M:%S'";`
^ note the two space characters at the beginning of the last line.
This renders to:
We commit all files with comment from script execution time: "generated files on date +'%Y-%m-%d %H:%M:%S'";
git commit -a -m "generated files on date +'%Y-%m-%d %H:%M:%S'";
Upvotes: 1
Reputation: 15472
You can use an HTML <br>
tag, i.e.
4. We commit all files with comment from script execution time
`date +'%Y-%m-%d %H:%M:%S'`;<br>`git commit -a -m "generated files on date +'%Y-%m-%d %H:%M:%S'"`;
Note that I think the whole thing is more readable like this.
Upvotes: 2
Reputation: 1035
if you want to ignore the `
backtick inside, you can do it this way
``inline containing backtick ` ``
this will output inline containing backtick `
Upvotes: 1