Skip to content

Commit 003c83e

Browse files
committed
Fix unused variable warning in generated markdown parser
1 parent 2632973 commit 003c83e

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

lib/rdoc/markdown.kpeg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ Code = ( Ticks1 < (
11541154
{ code text }
11551155

11561156
RawHtml = < HtmlBlockScript | HtmlTag > { html? ? text : '' }
1157-
StrippedComment = < HtmlComment > { '' }
1157+
StrippedComment = HtmlComment { '' }
11581158

11591159
BlankLine = @Sp @Newline { "\n" }
11601160

lib/rdoc/markdown.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14171,16 +14171,12 @@ def _RawHtml
1417114171
return _tmp
1417214172
end
1417314173

14174-
# StrippedComment = < HtmlComment > { '' }
14174+
# StrippedComment = HtmlComment { '' }
1417514175
def _StrippedComment
1417614176

1417714177
_save = self.pos
1417814178
while true # sequence
14179-
_text_start = self.pos
1418014179
_tmp = apply(:_HtmlComment)
14181-
if _tmp
14182-
text = get_text(_text_start)
14183-
end
1418414180
unless _tmp
1418514181
self.pos = _save
1418614182
break
@@ -16812,7 +16808,7 @@ def _DefinitionListDefinition
1681216808
Rules[:_Ticks5] = rule_info("Ticks5", "\"`````\" !\"`\"")
1681316809
Rules[:_Code] = rule_info("Code", "(Ticks1 < ((!\"`\" Nonspacechar)+ | !Ticks1 /`+/ | !Ticks1 (@Spacechar | @Newline !@BlankLine))+ > Ticks1 | Ticks2 < ((!\"`\" Nonspacechar)+ | !Ticks2 /`+/ | !Ticks2 (@Spacechar | @Newline !@BlankLine))+ > Ticks2 | Ticks3 < ((!\"`\" Nonspacechar)+ | !Ticks3 /`+/ | !Ticks3 (@Spacechar | @Newline !@BlankLine))+ > Ticks3 | Ticks4 < ((!\"`\" Nonspacechar)+ | !Ticks4 /`+/ | !Ticks4 (@Spacechar | @Newline !@BlankLine))+ > Ticks4 | Ticks5 < ((!\"`\" Nonspacechar)+ | !Ticks5 /`+/ | !Ticks5 (@Spacechar | @Newline !@BlankLine))+ > Ticks5) { code text }")
1681416810
Rules[:_RawHtml] = rule_info("RawHtml", "< (HtmlBlockScript | HtmlTag) > { html? ? text : '' }")
16815-
Rules[:_StrippedComment] = rule_info("StrippedComment", "< HtmlComment > { '' }")
16811+
Rules[:_StrippedComment] = rule_info("StrippedComment", "HtmlComment { '' }")
1681616812
Rules[:_BlankLine] = rule_info("BlankLine", "@Sp @Newline { \"\\n\" }")
1681716813
Rules[:_Quoted] = rule_info("Quoted", "(\"\\\"\" (!\"\\\"\" .)* \"\\\"\" | \"'\" (!\"'\" .)* \"'\")")
1681816814
Rules[:_HtmlAttribute] = rule_info("HtmlAttribute", "(AlphanumericAscii | \"-\")+ Spnl (\"=\" Spnl (Quoted | (!\">\" Nonspacechar)+))? Spnl")

0 commit comments

Comments
 (0)