A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/letchap/markdown-addcode below:

GitHub - letchap/markdown-addcode

A Python Markdown extension to add blockcode from an existing file containing the code.

All you have to do is to add a tag like {% addcode file.py %} in your markdown file and the code will be automatically added into a blockcode.

Just drop it in the extensions folder of the markdown package: markdown/extensions

Let's say you have a script.py file with the following lines :

from markdown.extensions import Extension
from markdown.preprocessors import Preprocessor

class AddCodePreprocessor(Preprocessor):
  blablabla...

Now add to your text.markdown file the following line :

And the content of script.py will be added as a blockcode in text.html

How to run the unit tests

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4