Created
September 21, 2011 02:38
-
-
Save danbernier/1231073 to your computer and use it in GitHub Desktop.
Markdown insists my String is an Array
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @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