Describe the bug
In both GoLand and VSCode, a misalignment occurs in the display due to the use of a tab space between the @tag and the content. If a space is used for separation, the display appears normal.
Screenshots
Now by swag fmt:
// ShowAccount godoc
//
// @Summary Show an account
// @Description get string by ID
// @Tags accounts
// @Accept json
// @Produce json
// @Param id path int true "Account ID"
// @Success 200 {object} model.Account
//
// @Failure 400 {object} fiber.Ctx
//
// @Failure 404 {object} httputil.HTTPError
// @Failure 500 {object} httputil.HTTPError
// @Router /accounts/{id} [get]
Expected behavior
The content should align correctly (space replace tab)
// ShowAccount godoc
//
// @Summary Show an account
// @Description get string by ID
// @Tags accounts
// @Accept json
// @Produce json
// @Param id path int true "Account ID"
// @Success 200 {object} model.Account
//
// @Failure 400 {object} fiber.Ctx
//
// @Failure 404 {object} httputil.HTTPError
// @Failure 500 {object} httputil.HTTPError
// @Router /accounts/{id} [get]
Your swag version
1.16.3
Your go version
1.22.0
Additional context
This problem seems to be related specifically to the use of tab spaces for separation in the code. The display appears normal when a regular space is used instead.
Describe the bug In both GoLand and VSCode, a misalignment occurs in the display due to the use of a tab space between the
@tag
and the content. If a space is used for separation, the display appears normal.Screenshots Now by swag fmt:
Expected behavior The content should align correctly (space replace tab)
Your swag version 1.16.3
Your go version 1.22.0
Additional context This problem seems to be related specifically to the use of tab spaces for separation in the code. The display appears normal when a regular space is used instead.
1364 #1366