Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with Markdown>=3.4.0 #16

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions markdown_blockdiag/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import base64

from markdown.blockprocessors import BlockProcessor
from markdown.util import etree
from markdown_blockdiag.utils import draw_blockdiag, DIAG_MODULES
from xml.etree import ElementTree

# Python 3 version
try:
Expand Down Expand Up @@ -53,6 +53,6 @@ def run(self, parent, blocks):
else:
src_data = 'data:image/svg+xml;charset=utf-8,{0}'.format(url_quote(diagram))

p = etree.SubElement(parent, 'p')
img = etree.SubElement(p, 'img')
p = ElementTree.SubElement(parent, 'p')
img = ElementTree.SubElement(p, 'img')
img.attrib['src'] = src_data