diff --git a/app/latex.py b/app/latex.py index 290f67a..f43b895 100644 --- a/app/latex.py +++ b/app/latex.py @@ -156,7 +156,12 @@ class LaTeXPreprocessor(markdown.preprocessors.Preprocessor): def run(self, lines): """Parses the actual page""" - # Re-creates the entire page so we can parse in a multine env. + # Checks for the LaTeX header + use_latex = any(line == '[//]: # (latex: 1)' for line in lines) + if not use_latex: + return lines + + # Re-creates the entire page so we can parse in a multiline env. page = "\n".join(lines) # Adds a preamble mode diff --git a/static/pages/Build-an-open-source-drone-with-a-Raspberry-Pi-and-Platypush.md b/static/pages/Build-an-open-source-drone-with-a-Raspberry-Pi-and-Platypush.md index 5ee0b9d..5847606 100644 --- a/static/pages/Build-an-open-source-drone-with-a-Raspberry-Pi-and-Platypush.md +++ b/static/pages/Build-an-open-source-drone-with-a-Raspberry-Pi-and-Platypush.md @@ -3,6 +3,7 @@ [//]: # (image: /img/drone-schema.png) [//]: # (author: Fabio Manganiello ) [//]: # (published: 2021-08-29) +[//]: # (latex: 1) Drones are increasingly popular and affordable nowadays, and they have become a popular toy for kids and adults of all ages. If all you need is a flying camera to take your holiday selfies then an off-the-shelf solution may