Commit 0270959a authored by erreur401's avatar erreur401

parser Fix (substitution url change)

parent ec150818
......@@ -22,7 +22,7 @@ for file in inputMd:
outputFile = open(PATH_TO_REPO_HOME +'app/pages/'+'_PARSED_'+fileName[0]+'.md', 'w')
yamlData = yaml.load(str(input.partition('...')[2].partition('...')[0]))
folderName = yamlData['folderImg']
outputMd = re.sub(r'(?:!\[(.*)\]\()(.*)(\/)(.*)(?:\))', r'![\1](http://localhost:5000/static/page_images/%s/\4)'%(folderName), input )
outputMd = re.sub(r'(?:!\[(.*)\]\()(.*)(\/)(.*)(?:\))', r'![\1](/static/%s/\4)'%(folderName), input )
outputMd = re.sub(r'(\.\.\.)\n','', outputMd )
outputFile.write(outputMd)
outputFile.close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment