Skip to content

Formatter inlines XML-like closing tags inconsistently in command files #64

Description

@TechNickAI

Issue

The post-edit prettier formatter hook inlines closing XML-like tags (e.g. </context-detection>, </auto-fix>, </output-format>) onto the preceding line of text, while most other closing tags in the same file (</checks>, </doctor-mode>, etc.) remain on their own lines. This creates inconsistency within the file and noisy diffs when a targeted fix triggers reformatting.

Example (from PR #63 diff)

-Report which context was detected at the top of output.
-</context-detection>
+Report which context was detected at the top of output. </context-detection>

Root cause

Prettier's line-length enforcement moves short closing tags inline when the preceding line has room. The inconsistency arises because some sections were written under a different formatter config or before the hook was added.

Options

  1. Add <!-- prettier-ignore --> or {/* prettier-ignore */} before affected sections
  2. Configure prettier to treat these XML-like blocks differently
  3. Accept formatter output as canonical and let it normalize the whole file over time

Raised by

claude[bot] review on PR #63.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    HexGenerated by Hex

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions