3 fix framework after Retina's version was fixed on TIO
source | link

Retina, 52 bytes

This answer is based on my Perl answer, with the help of Martin Ender for the golfing with Retina.

^ *
[
$
]
\s+
, 
m):`.+
[$&]
*T`[]`{}
], .
; 
^.|]$

Try it online!Try it online!

The explanations can be found on my Perl answer. The differences are:

*
[
$
]

Instead of s/^ *(.+)/[$1]/gm to both remove the leading spaces and add brackets around the lines.

^.|]$

To remove the leading and trailing brackets for the third output.

Retina, 52 bytes

This answer is based on my Perl answer, with the help of Martin Ender for the golfing with Retina.

^ *
[
$
]
\s+
, 
m):`.+
[$&]
*T`[]`{}
], .
; 
^.|]$

Try it online!

The explanations can be found on my Perl answer. The differences are:

*
[
$
]

Instead of s/^ *(.+)/[$1]/gm to both remove the leading spaces and add brackets around the lines.

^.|]$

To remove the leading and trailing brackets for the third output.

Retina, 52 bytes

This answer is based on my Perl answer, with the help of Martin Ender for the golfing with Retina.

^ *
[
$
]
\s+
, 
m):`.+
[$&]
*T`[]`{}
], .
; 
^.|]$

Try it online!

The explanations can be found on my Perl answer. The differences are:

*
[
$
]

Instead of s/^ *(.+)/[$1]/gm to both remove the leading spaces and add brackets around the lines.

^.|]$

To remove the leading and trailing brackets for the third output.

2 added 1 character in body
source | link

Retina, 5352 bytes

This answer is based on my Perl answer, with the help of Martin Ender for the golfing with Retina.

m(`^^ *
[
$
]
\s+
, 
m):`.+
[$&]
*T`[]`{}
], .
; 
^.|]$

Try it online!Try it online!

The explanations can be found on my Perl answer. The differences are:

*
[
$
]

Instead of s/^ *(.+)/[$1]/gm to both remove the leading spaces and add brackets around the lines.

^.|]$

To remove the leading and trailing brackets for the third output.

Retina, 53 bytes

This answer is based on my Perl answer, with the help of Martin Ender for the golfing with Retina.

m(`^ *
[
$
]
\s+
, 
:`.+
[$&]
*T`[]`{}
], .
; 
^.|]$

Try it online!

The explanations can be found on my Perl answer. The differences are:

*
[
$
]

Instead of s/^ *(.+)/[$1]/gm to both remove the leading spaces and add brackets around the lines.

^.|]$

To remove the leading and trailing brackets for the third output.

Retina, 52 bytes

This answer is based on my Perl answer, with the help of Martin Ender for the golfing with Retina.

^ *
[
$
]
\s+
, 
m):`.+
[$&]
*T`[]`{}
], .
; 
^.|]$

Try it online!

The explanations can be found on my Perl answer. The differences are:

*
[
$
]

Instead of s/^ *(.+)/[$1]/gm to both remove the leading spaces and add brackets around the lines.

^.|]$

To remove the leading and trailing brackets for the third output.

1
source | link

Retina, 53 bytes

This answer is based on my Perl answer, with the help of Martin Ender for the golfing with Retina.

m(`^ *
[
$
]
\s+
, 
:`.+
[$&]
*T`[]`{}
], .
; 
^.|]$

Try it online!

The explanations can be found on my Perl answer. The differences are:

*
[
$
]

Instead of s/^ *(.+)/[$1]/gm to both remove the leading spaces and add brackets around the lines.

^.|]$

To remove the leading and trailing brackets for the third output.