1

I have a short README.md where I have problems in formatting.

https://github.com/wojciehm/macOS-.bash_profile-cron-backup

Image with description

I can't paste the raw code because SO wants to format it as well.

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

Comments

1

if you want to ignore the `backtick inside, you can do it this way

``inline containing backtick ` ``

this will output inline containing backtick `

1 Comment

I tried that as well but with some error. Now it works.
1

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:

  1. 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'";

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.