Don’t overlook the built-in ‘code’ prototype. Using this a note is set up with monospace font, no smart quotes, etc. You can always use it’s rule to set another note, e.g. some prototype’s rule to the text of this ‘code’ note.
50 lines? Experience (of doing lots of things I probably shouldn’t have) tells me you might be trying something best not done in Tinderbox or that you should review your workflow. One trap of good support for incremental formalisation is can lead on to just adding code for edge cases rather than going back and reviewing the data structure. I find, judicious use of extra metadata, i.e. using a user attribute to capture some state, can make rules less byzantine. Of course, complexity rather varies with the actual data task at hand. Good luck!