Skip to content
Snippets Groups Projects
Commit 721dcb04 authored by David Rouquet's avatar David Rouquet
Browse files

fix add images to MD

parent c5812a19
Branches
No related tags found
1 merge request!4Main
...@@ -66,7 +66,7 @@ def postEditMD(str): ...@@ -66,7 +66,7 @@ def postEditMD(str):
regexIMG = re.compile(r"@IMAGESTART.*?@IMAGEEND") regexIMG = re.compile(r"@IMAGESTART.*?@IMAGEEND")
for imageElt in regexIMG.findall(str): for imageElt in regexIMG.findall(str):
imgFilename = imageElt.replace("@IMAGESTART","").replace("@IMAGEEND","").replace(r"\_","_") imgFilename = imageElt.replace("@IMAGESTART","").replace("@IMAGEEND","").replace(r"\_","_")
imgHtml = '<img src="/macao-hugo/media/'+imgFilename+'" id="'+imgFilename+'"\>' imgHtml = '<img src="/macao-hugo/media/'+imgFilename+'" id="'+imgFilename+'"/>'
str = str.replace(imageElt, imgHtml) str = str.replace(imageElt, imgHtml)
################################################### ###################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment