-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
Component/s: Pull Request - AI Code Reviewer
-
None
-
Severity 3 - Minor
-
2
Issue Summary
- This bug was raised by a user in community: https://community.atlassian.com/forums/Bitbucket-questions/Code-suggestions-convert-tab-indentation-to-spaces-on-apply/qaq-p/3221018
- 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.
Steps to Reproduce
- 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.
Expected Results
- Tab indentation should remain preserved
Actual Results
- Code suggestions convert tab indentation to spaces on apply, which causes syntax issues
Workaround
- Currently there is no known workaround for this behavior. A workaround will be added here when available