             for article in object[1]
                 msg.send "#{article}: #{createURL(article)}"
 
-    robot.respond /wiki summary (.*)/i, (msg) ->
+    robot.respond /wiki summary (.+)/i, (msg) ->
         params =
             action: 'query'
             exintro: true

                    msg.reply "The article you have entered (\"#{msg.match[1]}\") does not exist. Try a different article."
                    return

                summary = article.extract.split(". ")[0..1].join ". "
                msg.send "#{article.title}: #{summary}."
                msg.reply "Original article: #{createURL(article.title)}"
                return

createURL = (title) ->
    "https://en.wikipedia.org/wiki/#{encodeURIComponent(title)}"

wikiRequest = (msg, params = {}, handler) ->
    msg.http("http://en.wikipedia.org/w/api.php")
        .query(params)
        .get() (err, res, body) ->
            if err

# Author:
#   MrSaints

WIKI_API_URL = "https://en.wikipedia.org/w/api.php"
WIKI_EN_URL = "https://en.wikipedia.org/wiki"

module.exports = (robot) ->
    robot.respond /wiki search (.+)/i, (msg) ->
        params =
            action: 'opensearch'
            format: 'json'
