Class: SectionFeature

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

Constant Summary collapse

START_REGEXP =
/^##+ /
INDENT =
/^#(#+)/
FEATURE_TYPE =
:section

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)


200
201
202
203
204
205
# File 'lib/jay_flavored_markdown/markdown_converter.rb', line 200

def inside_of_list?(string, current_indent)
  return false if string.nil?
  return true if indent_length(string) > current_indent
  return true unless match_start_regexp?(string)
  return false
end