From 9b1e2709cbdb40eabb34d379df18e61c10e3737c Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 11 Apr 2019 18:44:21 +0200 Subject: add h3 --- megapixels/app/site/parser.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'megapixels') diff --git a/megapixels/app/site/parser.py b/megapixels/app/site/parser.py index dc2a09f2..6b71e041 100644 --- a/megapixels/app/site/parser.py +++ b/megapixels/app/site/parser.py @@ -145,8 +145,11 @@ def parse_markdown(metadata, sections, s3_path, skip_h1=False): return ' {}'.format(key, footnote_count, key, index, index) key_regex = re.compile(key.replace('[', '\\[').replace('^', '\\^').replace(']', '\\]')) content = key_regex.sub(footnote_tag, content) - footnote_txt = footnote_txt.replace("{}_BACKLINKS".format(index), "".join(footnote_backlinks)) + footnote_txt = footnote_txt.replace("{}_BACKLINKS".format(key), "".join(footnote_backlinks)) + content += '
' + content += '

References

' content += footnote_txt + content += '
' return content @@ -254,7 +257,7 @@ def format_footnotes(footnotes, s3_path): continue key, note = footnote.split(': ', 1) footnote_index_lookup[key] = index - footnote_list.append('{}_BACKLINKS'.format(key, index) + markdown(note)) + footnote_list.append('{}_BACKLINKS'.format(key, key) + markdown(note)) index += 1 footnote_txt = '
' -- cgit v1.2.3-70-g09d2