fix: indent #guard_msgs code action to match command indentation#13947
Open
rdavison wants to merge 1 commit into
Open
fix: indent #guard_msgs code action to match command indentation#13947rdavison wants to merge 1 commit into
#guard_msgs code action to match command indentation#13947rdavison wants to merge 1 commit into
Conversation
This PR fixes the `#guard_msgs` "Update with generated message" code action so that the generated doc comment respects the indentation of the `#guard_msgs` command. Previously the new doc comment delimiters were placed at column 0 and the `#guard_msgs` command lost its indentation. The replaced range runs from the doc comment up to the `#guard_msgs` token, which includes the command's leading whitespace, so the generated text now reuses that indentation for the closing `-/` delimiter and to re-indent the command. The message body stays flush-left because it is compared verbatim (modulo the whitespace mode). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Mathlib CI status (docs):
|
Collaborator
|
Reference manual CI status:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the
#guard_msgs"Update with generated message" code action so that the generated doc comment respects the indentation of the#guard_msgscommand. Previously the new doc comment delimiters were placed at column 0 and the#guard_msgscommand lost its indentation.For example, applying the code action to an indented invocation such as
previously produced (note the column-0
-/and the de-indented#guard_msgs):and now produces:
The replaced range runs from the doc comment up to the
#guard_msgstoken, which includes the command's leading whitespace, so the generated text now reuses that indentation for the closing-/delimiter and to re-indent the command. The message body stays flush-left because it is compared verbatim (modulo the whitespace mode), matching the existing convention intests/elab/mutual_coinduction.lean.🤖 Generated with Claude Code