Reproducing the issue Stefan Hirschenberger raised on 12/Aug/2025 on the now-closed BCLOUD-17360.
When a suggestion block contains tab-indented content, Bitbucket converts the tabs to 4 spaces when the suggestion is applied. The original file uses tabs. The result is a whitespace change that was never part of the intended suggestion.
Posted via REST API
```bash
curl -s -X POST \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
--data @payload.json \
"https://api.bitbucket.org/2.0/repositories/<workspace>/<repo>/pullrequests/<id>/comments"
```
Payload `raw` field (tabs preserved as `\t`):
```json
{
"content": {
"raw": "```suggestion\n\tdepends on BOARD_VT_RT1160\n\tdepends on VT_RESET_INFO\n\tdefault y\n```"
},
"inline": {
"path": "boards/arm/vt_rt1160/reboot/Kconfig",
"start_to": 23,
"to": 24
}
}
```
A similar comment/Change was made via the GUI and produced the same result.
If the comment was fetched using the REST API then the tabs could be seen, however, visually, they were shown as spaces.
When Applied, they were applied as spaces. This was confirmed visually by changing the tab width on the pull request settings.
When doing it manually, the tab is preserved until "Add comment now" is pushed, from then on, the tab is "lost". (Though if you pull that comment using the REST API the tab can be seen in the content.
Thank you for bringing this to our attention.
I can see that this was not raised as a bug ticket, so I've opened one on your behalf - you may Watch it to receive future updates related to it and click This Affects My Team to improve its visibility:
Cheers!
- Ben (Bitbucket Cloud Support)
Thanks Ben!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.