I recently just posted an article on here -- a tutorial for Flask -- and I was having trouble using the code blocks they supply us on here for markdown.
For example, I had this below block in one part of my blog.
from flask import Flask app = Flask(__name__) @app.route( ‘/’ ) def index(): return ‘<h1>Hello World!</h1>’
Then I copied this exact block down further and this is what I got:
from flask import Flask
app = Flask(name)
@app.route( "/" )
I was able to replicate this by adding a space inbetween the three ` marks. However, I didn't add the space in my blog, I literally copied and pasted what you see in the first block that actually works.
I was able to get it to work by just indenting all of the code, but I wanted to use the following version, and I wasn't able to with just indenting.
` ` `python code here ` ` `