Skip to content

v2.0.4

Latest

Choose a tag to compare

@pboling pboling released this 22 Feb 17:33
· 112 commits to main since this release
v2.0.4
41f0c08

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_lines now 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 so add_node_to_result and
    merge_node_body_recursively skip 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_merge now checks whether the output source's
    analysis had a trailing blank before advancing last_output_dest_line, so
    emit_dest_gap_lines correctly emits dest gap lines that the template lacked.

Official Discord 👉️ Live Chat on Discord

Many paths lead to being a sponsor or a backer of this project. Are you on such a path?

OpenCollective Backers OpenCollective Sponsors Sponsor Me on Github Liberapay Goal Progress Donate on PayPal

Buy me a coffee Donate on Polar Donate to my FLOSS efforts at ko-fi.com Donate to my FLOSS efforts using Patreon