diff options
author | Alan Pearce | 2014-09-13 20:17:45 +0100 |
---|---|---|
committer | Alan Pearce | 2014-09-13 20:20:01 +0100 |
commit | 5814a6cadbd6f6ca36398806197d458730686e03 (patch) | |
tree | 9b512f5714c7d772cb0ed3287da9a5c45ae1eca2 /src | |
parent | 3af8fd8a02787bed26efad80a91b8541390b8e22 (diff) | |
download | microformats-5814a6cadbd6f6ca36398806197d458730686e03.tar.lz microformats-5814a6cadbd6f6ca36398806197d458730686e03.tar.zst microformats-5814a6cadbd6f6ca36398806197d458730686e03.zip |
Refactor reducers for easier testing
Diffstat (limited to 'src')
-rw-r--r-- | src/microformats/parser.clj | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/microformats/parser.clj b/src/microformats/parser.clj index 882759a..94f0110 100644 --- a/src/microformats/parser.clj +++ b/src/microformats/parser.clj @@ -6,12 +6,12 @@ (defn mf-names-from-class "Get microformat classnames from a class attribute" [prefix] - (r/filter #(.startsWith % prefix))) + #(.startsWith % prefix)) (defn remove-mf-prefix "Remove microformats prefixes from a class attribute" [prefix] - (r/map #(apply str (drop (count prefix) %)))) + #(apply str (drop (count prefix) %))) (defn- split-classes "Split a whitespace-separated string." @@ -22,8 +22,8 @@ "Convert class list to list of microformat property keywords" [prefix] (comp (r/map keyword) - (remove-mf-prefix prefix) - (mf-names-from-class prefix))) + (r/map (remove-mf-prefix prefix)) + (r/filter (mf-names-from-class prefix)))) (defn element-to-classes "Get list of classes from an element" |