Advertisement
dgelessus

How to code block on the forums

Apr 27th, 2015
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. # How to properly insert a code block
  2.  
  3. This is your text before the code block. What you write here doesn't matter. If you want to you can even leave it out. It is important that if you put any text before the code block, there *must* be an empty line between the text and the code block start.
  4.  
  5. ```python
  6. def hello():
  7. print("Hello World!")
  8.  
  9. # This is your Python code.
  10. # The word "python" after the three backticks indicates that this text
  11. # should receive Python syntax highlighting.
  12. # Syntax-highlighted code blocks are not standard Markdown - they are
  13. # however supported by GitHub and omz-forums.
  14. # To create code blocks without syntax highlighting, remove the "python"
  15. # after the three backticks.
  16. ```
  17.  
  18. This is text after the code block. Again this is optional, but if there is any, there must be an empty line between the end of the code block and the next paragraph.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement