Skip to main content
2 of 5
added 194 characters in body
Link Ng
  • 593
  • 2
  • 10

C#, 201 bytes, by milk

using System.Linq; _=>string./**/ #if trueJoin (/*"*//*/""/**//*/"*/", #else Concat(//*/, #endif from m in" "let p=$@"{@" "[1]}"from i in(_.Replace(p,@""))where!new[]{p[0]^32^10}.Contains(i)select@i); 

repl.it demo

trueJoin is not defined, so only string.Join() remains.
p is "\n". p[0]^32^10 is space. It would have been (a bit) more difficult if it's p[0]^42 or other similar constants.

Link Ng
  • 593
  • 2
  • 10