about summary refs log tree commit diff
path: root/src/pronouns/pages.clj
diff options
context:
space:
mode:
authorThel Seraphim <thel.seraphim@gmail.com>2015-03-13 23:25:39 -0700
committerThel Seraphim <thel.seraphim@gmail.com>2015-03-13 23:25:39 -0700
commit818f985232b7b3cdcf3655a32b1f1ab5b133b052 (patch)
treea3c7162b4f01c679764cda1c9753b4fe8e86a386 /src/pronouns/pages.clj
parent58ea3864d809c51d056e411b883b311b42061190 (diff)
slight refactor of sentence rendering and include capitalization.
Diffstat (limited to 'src/pronouns/pages.clj')
-rw-r--r--src/pronouns/pages.clj21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/pronouns/pages.clj b/src/pronouns/pages.clj
index caa385b..66f65a9 100644
--- a/src/pronouns/pages.clj
+++ b/src/pronouns/pages.clj
@@ -7,34 +7,29 @@
   [pronoun]
   [:b pronoun])
 
-(defn wrap-para
-  [whatever]
-  [:p whatever])
+(defn render-sentence [& content]
+  [:p [:span.sentence content]]
+)
 
 (defn subject-example
   [subject]
-  (wrap-para
-   [:span#sentence (wrap-pronoun subject) " went to the park."]))
+  (render-sentence (wrap-pronoun (s/capitalize subject)) " went to the park."))
 
 (defn object-example
   [object]
-  (wrap-para
-   [:span#sentence "I went with " (wrap-pronoun object) "."]))
+  (render-sentence "I went with " (wrap-pronoun object) "."))
 
 (defn posessive-determiner-example
   [subject possessive-determiner]
-  (wrap-para
-   [:span#sentence (wrap-pronoun subject) " brought " (wrap-pronoun possessive-determiner) " frisbee."]))
+  (render-sentence (wrap-pronoun (s/capitalize subject)) " brought " (wrap-pronoun possessive-determiner) " frisbee."))
 
 (defn possessive-pronoun-example
   [possessive-pronoun]
-  (wrap-para
-   [:span#sentence "At least I think it was " (wrap-pronoun possessive-pronoun) "."]))
+  (render-sentence "At least I think it was " (wrap-pronoun possessive-pronoun) "."))
 
 (defn reflexive-example
   [subject reflexive]
-  (wrap-para
-   [:span#sentence (wrap-pronoun subject) " threw the frisbee to " (wrap-pronoun reflexive)]))
+  (render-sentence (wrap-pronoun (s/capitalize subject)) " threw the frisbee to " (wrap-pronoun reflexive) "."))
 
 
 (defn twitter-name [name]