Skip to main content
5 of 7
Rollback to Revision 3
Zgarb
  • 43.2k
  • 4
  • 84
  • 265

Husk, 44 43 41 bytes

|s0J'-x"+-"J'+f¹zμ+↓s²_&ε²¹↑□¹+"x^"s)¹m←ṡ 

Try it online!

This feels a bit clunky; Husk is not optimized for string manipulation. I'll try to golf it down. I borrowed some ideas from the Stax answer.

Zgarb
  • 43.2k
  • 4
  • 84
  • 265