This highway needs rain across both of its lanes In this challenge you will take a an ascii art image of a highway like so

 |   |   |  |  |  |
 |       |  |     |
 |   |   |  |  |  |
 |       |  |     |
 |   |   |  |  |  |
 |       |  |     |
 |   |   |  |  |  |


And you need to put rain across its lanes like so

 |\\\|\\\|  |\\|\\|
 |\\\\\\\|  |\\\\\|
 |\\\|\\\|  |\\|\\|
 |\\\\\\\|  |\\\\\|
 |\\\|\\\|  |\\|\\|
 |\\\\\\\|  |\\\\\|
 |\\\|\\\|  |\\|\\|




A highway will be defined as an ascii art string containing only the characters |,  and newlines. All rows of the image will have exactly the same number of characters.  Every column will be one of the following


Empty space, all spaces
A line, all |
A lane divider, alternating | and space


Furthermore there will always be a line before and after every lane divider.  So

|    |   | |   |
|          |   |
|    |   | |   |


would be valid but

|     |     |
|  |  |      
|     |     |


would not be since there is no line after the last lane divider.

And a lane divider will never be exactly next to a line.
So

||   |
|    |
||   |


Is invalid but

|   ||  ||
|     | ||
|   ||  ||
|     | ||
|   ||  ||


is fine.

Additionally a highway must be at least two rows high and one column wide.

Task

Your job is to write a program or function that takes a valid highway (as a string or list of lines) as input and outputs the highway with rain across its lanes.

To put rain across a highway's lanes you must replace all space characters that appear between two consecutive lines, where those lines have at least one lane divider between them, with \s.  And leave all other characters the same.

So in the following diagram:

A   B   C   1   2  D
|   |   |       |  |
|   |   |   |      |
|   |   |       |  |
|   |   |   |      |


No rain should be put between A and B or B and C since there are no lane dividers between them, but rain should be put between C and D since lane dividers 1 and 2 are between them.

You may output an additional trailing newline, or add/remove trailing spaces from all lines equally if you wish.

This is code-golf so answers will be scored in bytes with fewer bytes being better.

Test cases

Simple case

 |   |   |  |  |  |
 |       |  |     |
 |   |   |  |  |  |
 |       |  |     |
 |   |   |  |  |  |
 |       |  |     |
 |   |   |  |  |  |




 |\\\|\\\|  |\\|\\|
 |\\\\\\\|  |\\\\\|
 |\\\|\\\|  |\\|\\|
 |\\\\\\\|  |\\\\\|
 |\\\|\\\|  |\\|\\|
 |\\\\\\\|  |\\\\\|
 |\\\|\\\|  |\\|\\|




Extra line

|    |   | |   |
|          |   |
|    |   | |   |




|\\\\|\\\|\|   |
|\\\\\\\\\\|   |
|\\\\|\\\|\|   |




Unsynced lane dividers

   |    |      |
   |        |  |
   |    |      |
   |        |  |
   |    |      |




   |\\\\|\\\\\\|
   |\\\\\\\\|\\|
   |\\\\|\\\\\\|
   |\\\\\\\\|\\|
   |\\\\|\\\\\\|




Empty road

|   |   |       |  |
|   |   |   |      |
|   |   |       |  |
|   |   |   |      |




|   |   |\\\\\\\|\\|
|   |   |\\\|\\\\\\|
|   |   |\\\\\\\|\\|
|   |   |\\\|\\\\\\|




False roads (suggested by Arnauld)

|   | | |   |
|   |   |   |
|   | | |   |
|   |   |   |




|   |\|\|   |
|   |\\\|   |
|   |\|\|   |
|   |\\\|   |




Hard lane divider

|  |  |  |  |
|     |     |
|  |  |  |  |
|     |     |




|\\|\\|\\|\\|
|\\\\\|\\\\\|
|\\|\\|\\|\\|
|\\\\\|\\\\\|




Adjacent lane dividers

|   ||  ||
|     | ||
|   ||  ||
|     | ||
|   ||  ||




|\\\||\\||
|\\\\\|\||
|\\\||\\||
|\\\\\|\||
|\\\||\\||




No lanes

|    |     |  |
|    |     |  |
|    |     |  |




|    |     |  |
|    |     |  |
|    |     |  |




One line

       |
       |
       |




       |
       |
       |




No lines
Jelly, &nbsp;18&nbsp; 16 bytes

ZḢ”\E?€ṣ”|»Ṁ$€K»


A monadic Link accepting a list of lines, each of which is a list of characters, which yields another, similar list.

Try it online! Or see the test-suite.

How?

ZḢ”\E?€ṣ”|»Ṁ$€K» - Link: list of lists of characters (i.e. rows of text)
Z                - transpose - i.e. columns (each being: all spaces; all pipes; or a mix) 
      €          - for each (column):
     ?           -   if...
    E            -   ...condition: all equal? - i.e. if not dashed
 Ḣ               -   ...then: head - i.e. the unique character
  ”\             -   ...else: literal '\' character
        ”|       - literal '|' character
       ṣ         - split at - i.e. highway chunks now contain spaces and '\' characters
             €   - for each (chunk):
            $    -   last two links as a monad:
           Ṁ     -     maximum - N.B. '\' &gt; ' '
          »      -     maximum (vectorises across the chunk)
                 -   - i.e highway chunks become all '\', others remain as is
              K  - join with space characters
               » - maximum (vectorises across the rows)
                 -   - N.B. '|' &gt; ' ' so the solid lines are not replaced by spaces; and
                 -          '|' &gt; '\' so the dashed lines are not replaced with rain.