diff --git a/mkdocs.py b/mkdocs.py index c435c1411..c7921fcdf 100755 --- a/mkdocs.py +++ b/mkdocs.py @@ -65,5 +65,5 @@ for (dirpath, dirnames, filenames) in os.walk(docs_dir): if not os.path.exists(build_dir): os.makedirs(build_dir) output = page.replace('{{ content }}', content).replace('{{ toc }}', toc).replace('{{ base_url }}', base_url).replace('{{ suffix }}', suffix).replace('{{ index }}', index) - output = re.sub(r'a href="([^"]*)\.md"', r'a href="\1.html"', output) + output = re.sub(r'a href="([^"]*)\.md"', r'a href="\1%s"' % suffix, output) open(build_file, 'w').write(output.encode('utf-8'))