2.0.4 - 2026-02-22
- TAG: v2.0.4
- COVERAGE: 98.34% -- 891/906 lines in 12 files
- BRANCH COVERAGE: 84.34% -- 501/594 branches in 12 files
- 93.51% documented
Fixed
- Always preserve destination magic comments (
# frozen_string_literal: true,
# encoding: UTF-8, etc.) at the top of merged output, regardless of merge
preference. Magic comments are file-level metadata managed by Prism and must
not be lost when the template side lacks them (e.g. after filtering).
emit_dest_prefix_linesnow detects contiguous magic comments from the first
destination node's leading comments, emits them before any template-only nodes
(Phase 1), and records the emitted line numbers soadd_node_to_resultand
merge_node_body_recursivelyskip them to prevent duplication. - Non-top-of-file magic comments (e.g. used as documentation) are left alone and
treated as regular comments. - Fix blank line preservation between magic comments and subsequent comments when
template preference is used. Gap lines between a stripped magic comment and the
next remaining comment are now correctly emitted from the template source. - Fix inter-node gap line preservation when a matched node is output from the
template source.perform_mergenow checks whether the output source's
analysis had a trailing blank before advancinglast_output_dest_line, so
emit_dest_gap_linescorrectly emits dest gap lines that the template lacked.
Many paths lead to being a sponsor or a backer of this project. Are you on such a path?