Nov 16, 2016, 7:42 PM

Because of the way Muxify searches out comment blocks, some of my code breaks it and people who are doing a simple cut-paste-muxify will occasionally run into broken code because Muxify removes a huge chunk of code.

This is because I like switches, and because I like matching switches, and to match switches I use a lot of this: /*. And this: */. And this: */*.

The first two are the "block comment begin/end" notifiers, which Muxify will happily strip from the compressed code. And so my goal of having code that is easily cut-n-pasted is, er, cut short.


Here's the solution. Before copying over into Muxify, pull all the code you want to put into a text editor that is more advanced than "Text Edit". Textedit++ (windows), Sublime Text or Atom.io (any), or BBEdit (mac) are your go-to editors.

  1. Find
  2. Select the "Regular Expression" option for finding
  3. (?!^)(\/\*|\*\/)
  4. Hand-compress any matches.

It will match any /* or */ not in at the start of the line, and you can decide what to do from there.

WARNING: Not everyone puts the end-block-text at the start of a line, so for other people's code this may match false positives. Ignore them.


I hope this helps.