Inline snapshot testing attempts to figure out the indentation width of a file by finding the first line with whitespace and grabbing the prefix of whitespace. While this works fine if you trim whitespace from whitespace-only lines, it breaks if you do not, because a line of the form:
" \n"
Will currently match in its entirety and incorporate the newline into the indentation.
This PR fixes this by picking the first indented line that contains non-whitespace characters, instead.
Inline snapshot testing attempts to figure out the indentation width of a file by finding the first line with whitespace and grabbing the prefix of whitespace. While this works fine if you trim whitespace from whitespace-only lines, it breaks if you do not, because a line of the form:
Will currently match in its entirety and incorporate the newline into the indentation.
This PR fixes this by picking the first indented line that contains non-whitespace characters, instead.