From dd01e2521bb86666a19fab8710a1a086bfd1ec48 Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Mon, 7 Jun 2021 23:34:19 -0600 Subject: fix bug on new extensions --- src/pyssg/pyssg.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/pyssg/pyssg.py b/src/pyssg/pyssg.py index 0978e63..8e54f71 100644 --- a/src/pyssg/pyssg.py +++ b/src/pyssg/pyssg.py @@ -6,7 +6,7 @@ from typing import Union from jinja2 import Environment, FileSystemLoader from markdown import Markdown -import yafg +from yafg import YafgExtension from MarkdownHighlight.highlight import HighlightExtension from markdown_checklist.extension import ChecklistExtension @@ -160,13 +160,15 @@ def main() -> None: 'smarty', 'toc', 'wikilinks', - yafg.YafgExtension(stripTitle=True, - figureClass="", - figcaptionClass="", - figureNumbering=False, - figureNumberClass="number", - figureNumberText="Figure"), - HighlightExtension, + # stripTitle generates an error when True, + # if there is no title attr + YafgExtension(stripTitle=False, + figureClass="", + figcaptionClass="", + figureNumbering=False, + figureNumberClass="number", + figureNumberText="Figure"), + HighlightExtension(), ChecklistExtension()] md: Markdown = Markdown(extensions=exts, output_format='html5') -- cgit v1.2.3-70-g09d2