initial crack at a block-level figure parser

I didn't like the other figure + figcaption parsers, they either assumed
a lot about usage (e.g. images only), or they were inline parsers that
either wrapped the figure in a paragraph tag (which is incorrect syntax)
or did span trickery (annoying)

so, this handles images and maybe other things, and does things properly
with figures as their own blocks. incomplete but it works with my
images, and should allow for looping (for multi-line content) in the
future?
This commit is contained in:
2022-03-29 22:07:24 -05:00
parent b3c3c0de45
commit f15d955067
4 changed files with 87 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ class Config(object):
},
}
MARKDOWN_EXTENSIONS = ['extra', 'sane_lists', 'smarty', 'toc']
MARKDOWN_EXTENSIONS = ['extra', 'incorporealcms.mdx.figures', 'sane_lists', 'smarty', 'toc']
MARKDOWN_EXTENSION_CONFIGS = {
'extra': {
'footnotes': {