annotate-snippets-rs icon indicating copy to clipboard operation
annotate-snippets-rs copied to clipboard

feat: Add `Level::None` for omitting the header

Open BurntSushi opened this issue 10 months ago • 2 comments

When combined with an empty title, this results in the header being omitted entirely.

This isn't what @epage suggested in #167 since changing our rendering to pass in a custom header is a bigger refactor than what I've been able to get to. The goal of this change was to be very small without requiring bigger code changes on our end. Unfortunately, this is a breaking change, so I'm not sure what the appetite is for this.

Fixes #167

BurntSushi avatar Jan 08 '25 21:01 BurntSushi

I have a practically identical change in #159 for very similar reasons :)

ZedThree avatar Jan 09 '25 17:01 ZedThree

Ah nice, whoops, missed that!

BurntSushi avatar Jan 09 '25 17:01 BurntSushi

I'm also after pretty much the same change. Any chance this could be reviewed?

ndmitchell avatar Jun 12 '25 12:06 ndmitchell

I am sorry for not reviewing or commenting on this before now. annotate-snippets is currently in the middle of a major rewrite, as part of the project goal to use it for rustc's output. This has been my primary focus over the past few months. That said, I plan to add support for this when the new version is released (hopefully in the next few weeks).

Muscraft avatar Jun 12 '25 22:06 Muscraft

With v0.12, we now have Level::no_name which I believe resolves this concern

epage avatar Sep 02 '25 21:09 epage