Fixed support for C# comments
Hi Julien,
I tried out your add-in and I really like it. I found, however, that it does not work correctly with C# files. For C++ everything seems to work fine. I cloned your repository to https://github.com/johtela/MarkdownComments and did some debugging. It turned out that the problem was in the GetCodeCommentsSpans() method of the MarkdownCommentsTagger class. For C++ the classification tag aggregator returns each comment line separately whereas with C# it returns the whole comment block as one SnapshotSpan. The regular expressions that are parsing the comments are not designed to work with multi-line input, and they did not recognize for example the header lines correctly.
First I tried to change only the regular expressions by including the RegexOptions.Multiline option, but that did not work correctly. Then I reckoned that the best way to fix the issue is to change the GetCommentsSpans() method to always return each comment line in a separate SnapshotSpan range. This seems to work nicely.
So, I would appreciate if you could merge my fix to the master branch, and release a new version of the add-in. I am currently writing a literate programming tool for C# (https://github.com/johtela/LiterateProgramming), and your add-in would be a perfect companion to it. I'll publish a blog post about my tool when it is finished.
Regards, Tommi