1

I've been using LeMP to great effect to auto-generate some code that is identical across variants but for the type of the arguments. However, the classes I'm working on also contain methods authored "by hand", with no LeMP involvement. The challenge is that LeMP seems to throw away many of the newlines in the original code, making the generated C# much harder to read (which I still need to do for use with a debugger, etc).

There seem to be two cases:

  1. DllImport method prototypes just lose their newlines altogether -- looking in a hex editor, the newlines are transformed into spaces.
  2. Methods with actual function bodies, which look to retain some newlines but there is no newline between the closing curly brace and the next 'public T ...' for the next method, for instance.

Some methods seem to be untouched, which is what I'd like to see for everything that isn't generated by a macro.

What's the best way to get LeMP's output to retain as much of the original formatting in the code as possible?

j4m3z0r
  • 397
  • 1
  • 3
  • 8
  • Hmmm, ok, it looks like this only happens for code between #region ... #endregion sections. Perhaps a workaround might be to write a macro to generate regions instead. Will investigate further. – j4m3z0r Jul 13 '18 at 16:43

1 Answers1

0

Ok, it seems pretty likely that this is caused by a bug. I've filed 2 issues with some more details.

j4m3z0r
  • 397
  • 1
  • 3
  • 8