Skip to content

Instantly share code, notes, and snippets.

@danbernier
Created September 21, 2011 02:38
Show Gist options
  • Save danbernier/1231073 to your computer and use it in GitHub Desktop.
Save danbernier/1231073 to your computer and use it in GitHub Desktop.
Markdown insists my String is an Array
# @paragraphs is an Array of Strings - various puts'es confirm this.
@paragraphs.each do |paragraph|
renderer = HH::LessonParaRenderer.new(container)
markdown = Redcarpet::Markdown.new(renderer)
p paragraph # Just checking - it's a String!
# raises: <TypeError: wrong argument type Array (expected String)>
markdown.render(paragraph)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment