Skip to content

Commit

Permalink
Fix accidental removal of attachments by put.
Browse files Browse the repository at this point in the history
  • Loading branch information
AZWN committed Apr 21, 2022
1 parent 2dac1fd commit 888f40d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ private IStrategoTerm index(final IStrategoTerm term) {
plhdr -> termFactory.annotateTerm(termFactory.makePlaceholder(plhdr.getTemplate()), plhdr.getAnnotations())
));
// @formatter:on
termFactory.copyAttachments(term, result);
final TermIndex index1 = TermIndex.of(resource, ++currentId);
final TermIndex index2 = (TermIndex) TermOrigin.get(term).map(o -> o.put(index1)).orElse(index1);
result = put(index2, result, termFactory);
termFactory.copyAttachments(term, result);
return result;
}

Expand Down

0 comments on commit 888f40d

Please sign in to comment.