jeudi 25 juillet 2019

Flask-Misaka doesn't render latex

I'm creating a personal blog that requires latex support. I'm using Flask-Misaka but it won't render latex. Any idea how I can proceed?

I've moved some code around to no avail..

this is my routes.py:

from application import app
from flask import render_template
from flask_misaka import markdown

content=""
with open("./markdown/sampletext.md", "r") as f:
    content = f.read()
@app.route("/")
def index():
    return render_template("index.html", text=markdown(content, math=True))

And here is my init.py:

from flask import Flask
from flask_misaka import Misaka

app = Flask(__name__)
Misaka(app, math=True)

from application import routes

In the index.html template I use:

Flask runs fine just won't render the latex in the markdown..




Aucun commentaire:

Enregistrer un commentaire