# [APL (Dyalog Unicode)], 28 bytes

<!-- language-all: lang-apl -->

Full program. Prompts for code, then for comment character.

    ⍞,⍤1⍨⎕FMT⎕TC[2]@('|'∘=)⍞,' '

[Try it online!][TIO-l7oki0iw]

`⍞,' '` append a space the to prompted-for code

`⎕TC[2]@(`…`)` place the 2nd Terminal Control character (Line Feed) **at** the positions indicated by:

 `'|'∘=` the mask indicating where the pipe symbol is equal to the characters

`⎕FMT` ForMaT as a character matrix, evaluating terminal control characters (Line Feed moves the "cursor" down one line)

`⍞,⍤1⍨` prompt for comment character and append it to each line (lit. to each 1D sub-array)


[APL (Dyalog Unicode)]: https://www.dyalog.com/
[TIO-l7oki0iw]: https://tio.run/##PYy9asMwFIV3PcXNUNxCOthxSigUDKbdunkLGWT52g64krG0BM7eLO4WyNSpQ55LL@LKGXyGM3znR/bdc3WSnWkmf/7uJz/@rv34F/vx5n8uH59F8CLfJ4fsMULkz9e3p7kSUTT3J7qrFxIlFCowajRiLRZeqorrRrwuJMUO8RbxC5IN0kQ8LMk7pEJLFqzcEUbT0YKMZgpUDlI5xkCd0Q0PINdKHYxBnbRuJVbLTdGGXW4qDisL8FfvToCdT422IvsH "APL (Dyalog Unicode) – Try It Online"