Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown Cheatsheet #84

Open
AllanChain opened this issue Apr 18, 2020 · 0 comments
Open

Markdown Cheatsheet #84

AllanChain opened this issue Apr 18, 2020 · 0 comments
Labels
blog: cheatsheet |108686978-1ae51480-7531-11eb-93c7-d201146b237d.jpg @post This is a blog post

Comments

@AllanChain
Copy link
Owner

AllanChain commented Apr 18, 2020

View Post on Blog

Tricks that are less known to GitHub-flavored markdown starters, including escaping `s, writing dropdowns, and centering an image.


Escaping `

The general principle is, escape ` with more `s.

For example, if you want to escape a single `, just wrap it with two on each side, and add spaces, that is, `` ` ``.

If you want to escape three back quotes in a code block, use 4 for the code fence:

````
```python
print('hello')
```
````

Produces:

```python
print('hello')
```

Awesome Dropdown!

Write Markdown!

Python Code

from __future__ import print_function
print('Hello world!')
Raw code
<details open>
<summary>Write Markdown!</summary>
<!--All you need is a blank line-->

**Python** *Code*
````python
from __future__ import print_function
print('Hello world!')
```
</details>

Reference: https://github.github.com/gfm/#html-block

The trick is, that the blank line terminates the HTML block

Center an Image in GFM

Use HTML tag p with align to wrap img

<p align="center">
  <img alt="GitHub fluid icon" width="100" src="https://github.com/fluidicon.png">
</p>

GitHub fluid icon

@AllanChain AllanChain added the blog: cheatsheet |108686978-1ae51480-7531-11eb-93c7-d201146b237d.jpg label Jun 30, 2020
@AllanChain AllanChain changed the title Markdown | AC's Blog Markdown Cheatsheet Jun 30, 2020
@AllanChain AllanChain added the @post This is a blog post label Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blog: cheatsheet |108686978-1ae51480-7531-11eb-93c7-d201146b237d.jpg @post This is a blog post
Projects
None yet
Development

No branches or pull requests

1 participant