                   :description description
                   :tags (re-seq #"\S+" tags)
                   :restricted (re-seq #"\S+" restricted)
-                  :tests (s/split-lines code)
+                  :tests (s/split code #"\r\n\r\n")
                   :user (if (empty? author) user author)
                   :approved false})
         (flash-msg "Thank you for submitting a problem! Be sure to check back to see it posted." "/problems"))

                   :tags (s/join " " tags)
                   :restricted (s/join " " restricted)
                   :description description
                   :tests (s/join "\n" tests)}]
      (session/flash-put! k v))
    (response/redirect "/problems/submit")))



(def-page problem-submission-page []
  [:div.instructions
   [:p "Thanks for choosing to submit a problem. Please make sure that you own the rights to the code you are submitting and that you wouldn't mind having us use the code as a 4clojure problem.  Once you've submitted your problem, it won't appear on the site until someone from the 4clojure team has had a chance to review it."]]
  (form-to {:id "problem-submission"} [:post "/problems/submit"]
    (hidden-field :author (session/flash-get :author))
    (hidden-field :prob-id (session/flash-get :prob-id))
