Class: ListItemFeature

Inherits:
MarkdownFeature show all
Defined in:
lib/jay_flavored_markdown/markdown_converter.rb

Constant Summary collapse

START_REGEXP =
/^(\s)*[*+-] /
INDENT =
/^(\s{2,})/
FEATURE_TYPE =
:item

Instance Method Summary collapse

Methods inherited from MarkdownFeature

create, #create_counter, #indent_length, #match_start_regexp?, #select_counter

Instance Method Details

#inside_of_list?(string, current_indent) ⇒ Boolean

Returns:

  • (Boolean)


187
188
189
190
191
192
# File 'lib/jay_flavored_markdown/markdown_converter.rb', line 187

def inside_of_list?(string, current_indent)
  return false if string.nil?
  return true if indent_length(string) > current_indent
  return true if string =~ /^\r*$/
  return false
end