This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge pull request #841 from pangratz/master

Fix typo in children_of_type method
  • Loading branch information...
Tom Bell
Tom Bell committed Mar 25, 2013
2 parents c0e09dd + 4586722 commit 1ccc77f30e413352a67cf30338b5d3c2294ad2a3
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/scripts/itcrowd.coffee
@@ -32,7 +32,7 @@ module.exports = (robot) ->
get_quote = (msg, quotes) ->
- nodeChildren = _.flatten childern_of_type(quotes[Math.floor(Math.random() * quotes.length)])
+ nodeChildren = _.flatten children_of_type(quotes[Math.floor(Math.random() * quotes.length)])
quote = (textNode.data for textNode in nodeChildren).join(' ').replace(/^\s+|\s+$/g, '')
msg.send quote
@@ -45,11 +45,11 @@ parse_html = (html, selector) ->
parser.parseComplete html
Select handler.dom, selector
-childern_of_type = (root) ->
+children_of_type = (root) ->
return [root] if root?.type is "text"
if root?.children?.length > 0
- return (childern_of_type(child) for child in root.children)
+ return (children_of_type(child) for child in root.children)
get_dom = (xml) ->
body = JsDom.jsdom(xml)

0 comments on commit 1ccc77f

Please sign in to comment.