add comment delete function
I find that your vba_code initialisation module does not do what it should do with comments, which makes it easy to treat text content as code and is highly prone to false positives.
So I add a module in oletools/olevba.py to delete the comments in vba_code.
Hi @Yu-Tu, thank you for the proposal. I think it should be an option for the caller to decide if comments are kept or removed. Most of the time, I prefer to keep the full source code. Another solution would be to just provide a function to remove comments (as you did), without calling it every time in olevba. Then it would be up to the application to call it or not after it gets the VBA code, if it's better to remove comments. Also I see that you process each line, character by character. It would be much faster to use string functions to split on the first occurence of '. But it's not so straightforward. You can have ' within VBA strings, in that case you need to ignore them...
Thank you for your adoption, I am a beginner, may not have a good code specification, but I think this will be more time complexity than split and get position 0 lol.