Skip to content

Commit

Permalink
Fixes #385 - source in header isn't a link
Browse files Browse the repository at this point in the history
The source item in a GEDCOM header isn't a link. It is a block
describing the source software of that particular GEDCOM file.
As such it needs to be treated as an attribute of the header
and not as a link or as a source object.

Change the object factory used when parsing GEDCOM files to
reflect that changed thinking.
  • Loading branch information
dickschoeller committed Jun 24, 2017
1 parent 25d5aee commit 3a9c8e6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,11 @@ public final GedObject create(final GedObject parent,
if (parent.getParent() == null) {
return new Source(parent, xref);
} else {
return SOURLINK_FACTORY.create(parent, xref, tag, tail);
if (tail.contains("@")) {
return SOURLINK_FACTORY.create(parent, xref, tag, tail);
} else {
return ATTR_FACTORY.create(parent, xref, tag, tail);
}
}
}
}
Expand Down

0 comments on commit 3a9c8e6

Please sign in to comment.