Created
May 29, 2012 22:14
-
-
Save ninjudd/2831128 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- a/src/clj_gedcom/core.clj | |
| +++ b/src/clj_gedcom/core.clj | |
| @@ -67,9 +67,9 @@ | |
| "Parses GEDCOM records from a file or reader, returning map of labels to records." | |
| [in] | |
| (reduce (fn [records record] | |
| - (let [label (:label record)] | |
| - (when (contains? records label) | |
| - (throw (Exception. (format "duplicate record in GEDCOM for label %s" label)))) | |
| - (assoc records label record))) | |
| + (let [id (or (:label record) (:tag record))] | |
| + (when (contains? records id) | |
| + (throw (Exception. (format "duplicate record in GEDCOM for %s" id)))) | |
| + (assoc records id record))) | |
| {} | |
| (parse-gedcom-records in))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment