transform {code} to [source] elements