Thenocode and Muxify
-
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.
- Find
- Select the "Regular Expression" option for finding
(?!^)(\/\*|\*\/)
- 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.
-
For those unfamiliar what I mean by 'block comments', there are typically two types of comments. One line comments:
// This is a quick note
And larger blocks of text meant to be only read by you for important information:
/* Hello. This is a bit of dodgy code and here's how it works: Blah blah blah Blee blee blee foo -> bar foof -> yay */
The latter is the challenge. If I come up with a better solution than making the game-builder do some manual work, I'll do my best to implement it across my entire code package line, but there's enough chaff that I can't guarantee it.