Stop Postman from Removing Whitespace from PRS/Tests

  • Descriptive Situation: When writing code in the pre-script or test tabs, if you’re on a tabulated line click away to write something and come back, it removes all tabulation. This is extremely frustrating as I have to remove the line and create a new line to get the tabulation back.

  • Introduce The Question: Please tell me how it’s possible to stop Postman from removing this whitespace? It doesn’t cover it in the settings anywhere as “Trim keys and values in request body” applies to the body only. This breaks my productivity/flow immensely!

  • Reproduction:

  1. On a request, open pre-request scripts or tests tab.
  2. Create a new code block e.g.:
const fake = {
  1. Click on any other line and type something.
  2. Return to previous line and cursor will reset to the index of 0 e.g.:
const fake = {
  • Platform Details:
    Postman for Windows
    Version 10.20.0

  • UI version

  • Desktop platform version

  • Architecture

  • OS platform
    win32 10.0.18362

Hey @uninfamousalec :wave:,

Could you include a short recording of the behaviour that you’re seeing please?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.