Skip to content

Commit

Permalink
Merge pull request #16 from mbarkhau/patch-1
Browse files Browse the repository at this point in the history
Fix compatibility with Markdown>=3.4.0
  • Loading branch information
ecarreras committed Nov 22, 2023
2 parents 0001527 + 8f8ad02 commit 82f7f99
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 82f7f99

Please sign in to comment.