@@ -824,8 +824,6 @@ def paragraph parts
824824 def parse markdown
825825 @references = { }
826826 @unlinked_references = { }
827- @footnotes = nil
828- @note_order = nil
829827
830828 markdown += "\n \n "
831829
@@ -15480,7 +15478,7 @@ def _Note
1548015478 return _tmp
1548115479 end
1548215480
15483- # 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 }
15481+ # InlineNote = &{ notes? } "^[" @StartList:a (!"]" Inline:l { a << l })+ "]" { if @note_order ref = [:inline, @note_order.length] @footnotes[ref] = paragraph a note_for ref end }
1548415482 def _InlineNote
1548515483
1548615484 _save = self . pos
@@ -15571,12 +15569,12 @@ def _InlineNote
1557115569 self . pos = _save
1557215570 break
1557315571 end
15574- @result = begin ; raise ParseError , 'invalid inline note' unless @note_order
15572+ @result = begin ; if @note_order
15573+ ref = [ :inline , @note_order . length ]
15574+ @footnotes [ ref ] = paragraph a
1557515575
15576- ref = [ :inline , @note_order . length ]
15577- @footnotes [ ref ] = paragraph a
15578-
15579- note_for ref
15576+ note_for ref
15577+ end
1558015578 ; end
1558115579 _tmp = true
1558215580 unless _tmp
@@ -16847,7 +16845,7 @@ def _DefinitionListDefinition
1684716845 Rules [ :_NoteReference ] = rule_info ( "NoteReference" , "&{ notes? } RawNoteReference:ref { note_for ref }" )
1684816846 Rules [ :_RawNoteReference ] = rule_info ( "RawNoteReference" , "\" [^\" < (!@Newline !\" ]\" .)+ > \" ]\" { text }" )
1684916847 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 }" )
16850- 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 }" )
16848+ 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 }" )
1685116849 Rules [ :_Notes ] = rule_info ( "Notes" , "(Note | SkipBlock)*" )
1685216850 Rules [ :_RawNoteBlock ] = rule_info ( "RawNoteBlock" , "@StartList:a (!@BlankLine !RawNoteReference OptionallyIndentedLine:l { a << l })+ < @BlankLine* > { a << text } { a }" )
1685316851 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