diff --git a/lib/rdoc/markdown.kpeg b/lib/rdoc/markdown.kpeg index d37a237883..e1193fbb00 100644 --- a/lib/rdoc/markdown.kpeg +++ b/lib/rdoc/markdown.kpeg @@ -449,7 +449,7 @@ @note_order.each_with_index do |ref, index| label = index + 1 - note = @footnotes[ref] + note = @footnotes[ref] or raise ParseError, "footnote [^#{ref}] not found" link = "{^#{label}}[rdoc-label:footmark-#{label}:foottext-#{label}] " note.parts.unshift link @@ -1179,7 +1179,7 @@ InlineNote = &{ notes? } Notes = ( Note | SkipBlock )* RawNoteBlock = @StartList:a - ( !@BlankLine OptionallyIndentedLine:l { a << l } )+ + ( !@BlankLine !RawNoteReference OptionallyIndentedLine:l { a << l } )+ ( < @BlankLine* > { a << text } ) { a } diff --git a/test/rdoc/test_rdoc_markdown.rb b/test/rdoc/test_rdoc_markdown.rb index c223c44c12..ca76c34f43 100644 --- a/test/rdoc/test_rdoc_markdown.rb +++ b/test/rdoc/test_rdoc_markdown.rb @@ -761,7 +761,6 @@ def test_parse_note_multiple and an extra note.[^2] [^1]: With a footnote - [^2]: Which should be numbered correctly MD