Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve first comment indentation #919

Open
monacofj opened this issue Feb 23, 2024 · 1 comment · May be fixed by #920
Open

Preserve first comment indentation #919

monacofj opened this issue Feb 23, 2024 · 1 comment · May be fixed by #920

Comments

@monacofj
Copy link
Contributor

This is minor change that I needed to serve my particular demands; sharing it in the event it's of use:

preserve the indentation of the first comment.

TL;DR;

Some editors (e.g. Emacs) use to automatically indent comments in assembly code, like

          ;; Do something

          mov $42, %eax
          ret

          ;; Do something else

          sub $1, %eax
          ret

Currently, reuse annotate would render the output like this

;;; SPDX-FileCopyrightText: 2024 Author
;;;
;;; SPDX-License-Identifier: CCO

;; Do something

          mov $42, %eax
          ret

         ;; Do something else

          sub $1, %eax
          ret

The suggested change should preserve the original indentation of the first paragraph:

;;; SPDX-FileCopyrightText: 2024 Author
;;;
;;; SPDX-License-Identifier: CCO

        ;; Do something

          mov $42, %eax
          ret

         ;; Do something else

          sub $1, %eax
          ret
@monacofj monacofj linked a pull request Feb 23, 2024 that will close this issue
@monacofj
Copy link
Contributor Author

Tentative fix in PR #920.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant