@@ -822,8 +822,6 @@ def paragraph parts
822822 def parse markdown
823823 @references = { }
824824 @unlinked_references = { }
825- @footnotes = nil
826- @note_order = nil
827825
828826 markdown += "\n \n "
829827
@@ -15478,7 +15476,7 @@ def _Note
1547815476 return _tmp
1547915477 end
1548015478
15481- # InlineNote = &{ notes? } "^[" @StartList:a (!"]" Inline:l { a << l })+ "]" { raise ParseError, 'invalid inline note' unless @note_order ref = [:inline, @note_order.length] @footnotes[ref] = paragraph a note_for ref }
15479+ # InlineNote = &{ notes? } "^[" @StartList:a (!"]" Inline:l { a << l })+ "]" { if @note_order ref = [:inline, @note_order.length] @footnotes[ref] = paragraph a note_for ref end }
1548215480 def _InlineNote
1548315481
1548415482 _save = self . pos
@@ -15569,12 +15567,12 @@ def _InlineNote
1556915567 self . pos = _save
1557015568 break
1557115569 end
15572- @result = begin ; raise ParseError , 'invalid inline note' unless @note_order
15570+ @result = begin ; if @note_order
15571+ ref = [ :inline , @note_order . length ]
15572+ @footnotes [ ref ] = paragraph a
1557315573
15574- ref = [ :inline , @note_order . length ]
15575- @footnotes [ ref ] = paragraph a
15576-
15577- note_for ref
15574+ note_for ref
15575+ end
1557815576 ; end
1557915577 _tmp = true
1558015578 unless _tmp
@@ -16845,7 +16843,7 @@ def _DefinitionListDefinition
1684516843 Rules [ :_NoteReference ] = rule_info ( "NoteReference" , "&{ notes? } RawNoteReference:ref { note_for ref }" )
1684616844 Rules [ :_RawNoteReference ] = rule_info ( "RawNoteReference" , "\" [^\" < (!@Newline !\" ]\" .)+ > \" ]\" { text }" )
1684716845 Rules [ :_Note ] = rule_info ( "Note" , "&{ notes? } @NonindentSpace RawNoteReference:ref \" :\" @Sp @StartList:a RawNoteBlock:i { a.concat i } (&Indent RawNoteBlock:i { a.concat i })* { @footnotes[ref] = paragraph a nil }" )
16848- Rules [ :_InlineNote ] = rule_info ( "InlineNote" , "&{ notes? } \" ^[\" @StartList:a (!\" ]\" Inline:l { a << l })+ \" ]\" { raise ParseError, 'invalid inline note' unless @note_order ref = [:inline, @note_order.length] @footnotes[ref] = paragraph a note_for ref }" )
16846+ Rules [ :_InlineNote ] = rule_info ( "InlineNote" , "&{ notes? } \" ^[\" @StartList:a (!\" ]\" Inline:l { a << l })+ \" ]\" { if @note_order ref = [:inline, @note_order.length] @footnotes[ref] = paragraph a note_for ref end }" )
1684916847 Rules [ :_Notes ] = rule_info ( "Notes" , "(Note | SkipBlock)*" )
1685016848 Rules [ :_RawNoteBlock ] = rule_info ( "RawNoteBlock" , "@StartList:a (!@BlankLine !RawNoteReference OptionallyIndentedLine:l { a << l })+ < @BlankLine* > { a << text } { a }" )
1685116849 Rules [ :_CodeFence ] = rule_info ( "CodeFence" , "&{ github? } Ticks3 (@Sp StrChunk:format)? @Sp @Newline? < ((!\" `\" Nonspacechar)+ | !Ticks3 /`+/ | Spacechar | @Newline)+ > Ticks3 @Sp @Newline* { verbatim = RDoc::Markup::Verbatim.new text verbatim.format = format.intern if format.instance_of?(String) verbatim }" )
0 commit comments