Extension for Python Markdown library for adding extra classes to the leading and trailing element