class MarkdownParserService::ListExtractor

Attributes

files[R]

Public Instance Methods

list(_contents, _list_type) click to toggle source
# File lib/renuo/cli/app/services/markdown_parser_service.rb, line 9
def list(_contents, _list_type)
  @next_is_hint = true
  ""
end
list_item(text, _list_type) click to toggle source
# File lib/renuo/cli/app/services/markdown_parser_service.rb, line 14
def list_item(text, _list_type)
  @files ||= []
  if @next_is_hint
    @files.last.unshift text.strip
    @next_is_hint = false
  else
    @files << [text.strip]
  end
  ""
end