diff --git a/mdit_py_plugins/footnote/index.py b/mdit_py_plugins/footnote/index.py index 0ddd314..119fb71 100644 --- a/mdit_py_plugins/footnote/index.py +++ b/mdit_py_plugins/footnote/index.py @@ -80,7 +80,7 @@ def footnote_def(state: StateBlock, startLine: int, endLine: int, silent: bool): if pos == start + 2: # no empty footnote labels return False pos += 1 - if pos + 1 >= maximum or state.srcCharCode[pos] != 0x3A: # /* : */ + if pos >= maximum or state.srcCharCode[pos] != 0x3A: # /* : */ return False if silent: return True diff --git a/tests/fixtures/footnote.md b/tests/fixtures/footnote.md index b59dd4a..b0643e1 100644 --- a/tests/fixtures/footnote.md +++ b/tests/fixtures/footnote.md @@ -326,3 +326,21 @@ Some text . + + +Newline after footnote identifier +. +[^a] + +[^a]: +b +. +
+b
+