Detect Rectangular Text with Rectangular Code Given a string of printable ASCII text (including newlines and spaces) that contains at least one character that is neither a newline nor a space, output a truthy value if the string is rectangular, and a falsey value otherwise. Additionally, the source code for your solution must be rectangular.

A string is rectangular if it meets all of the following conditions:


The first line and the last line contain no spaces.
The first and last character of each line is not a space.
All lines have the same number of characters.


For example, the following text is rectangular:

abcd
e fg
hijk


This text, however, is not rectangular (requirement #3):

1234
567
8900


Test Cases

Truthy:

sdghajksfg




asdf
jkl;




qwerty
u i op
zxcvbn




1234
5  6
7890




abcd
e fg
hijk


Falsey:

a b c




123
456
7 9




12
345




qwerty
 uiop
zxcvnm




1234
567
8900




This is code-golf, so the shortest solution in bytes wins.
C (gcc), 127 125 124 118 bytes


Saved two bytes by golfing r*=!e&amp;(!t|t==c); to r&gt;&gt;=e||t&amp;&amp;t-c;. (This golf was the inspiration for my recent C tips answer Inverse flag update.)
Saved a byte by golfing *(_-2) to _[~1].
Saved six bytes by golfing *_++-10||(...) to *_++&lt;11?...:0 and utilizing the placeholder zero ...:0 (which is not used constructively) to golf the c++ increment. Those golfs allowed some further loop reshuffling.
When one can use multiple falsey values, 114 bytes could be possible.




r,e,c,t;_(char*_){for(r=1,t=c=0;*_;*_++&lt;11?r*=(t||(t=c,!e))&amp;*_&gt;32&amp;_[~1]&gt;32&amp;t==c,c=e=0:c++)*_-32||(e=1);r&gt;&gt;=e||t&amp;&amp;t-c;}


Try it online!



Source layout achieving a taller rectangle.

Explanation

The following explains the 124 bytes long version.



r,e,c,t;_(char*_){     // `r` is the boolean result flag, `e` a boolean flag if the current line contains
                       //  a space, `t` the first line's width, `c` the current line's current width
 for(r=1,t=c=0;*_;c++) // initialize, loop through entire string
  *_-32||              // if the current char is a space,
   (e=1),              //  the current line contains a space
  *_++-10||            // if the current char is a newline (char pointer `_` now incremented)
   (r*=(t||(t=c,!e))   // if t is not yet set, the current line is the first line; set it
                       //  to this line's length, check that no spaces where found
    &amp;*_&gt;32             // the next line's first char should not be a space
    &amp;_[~1]&gt;32          // this line's last char should not have been a space
    &amp;t==c,c=~0,e=0);   // the line lengths should match, reset `c` and `e` to zero
                       //  (`~0 == -1`, countering the loop's increment of `c`)
 r&gt;&gt;=e||t&amp;&amp;t-c;}       // return boolean flag, check that the last line does not contain spaces,
                       //  there was either no newline or line lengths match
                       //  (here) equivalent to `r*=!e&amp;(!t|t==c)`


Try it online!