Discussion:
Make meld ignore comments
Christoph Siefer
2011-12-14 19:26:49 UTC
Permalink
Hi everybody,

I'm new to the list. As I could not find any relevant info on how to
make meld ignore multiline-comments like

/*

* ignorable

* text

*/

I'm asking for help here.

Best regards,

Christoph Siefer
--
-----------------------------------------------------------
www.odalis.net: integrated KMS/CMS/DMS/Data-Warehouse

sym.net martin butz & christoph siefer gbr
gotenring 27 50679 koeln 049.(0)221.3762590
email: ***@sym.net net: http://www.sym.net
Grant Edwards
2011-12-14 22:09:59 UTC
Permalink
Post by Christoph Siefer
Hi everybody,
I'm new to the list. As I could not find any relevant info on how to
make meld ignore multiline-comments like
/*
* ignorable
* text
*/
Dealing programmatically with multi-line comments is difficult (in
general). That's one reason why many years ago I switched over to
exclusively using "//" style comments:

//
// ignorable
// tex
//

I know that doesn't help your current situation unless you're willing
to convert the source files (which might be something worth
considering).
--
Grant Edwards grant.b.edwards Yow! I'm reporting for duty
at as a modern person. I want
gmail.com to do the Latin Hustle now!
Kai
2011-12-15 08:57:47 UTC
Permalink
Post by Christoph Siefer
Hi everybody,
I'm new to the list. As I could not find any relevant info on how to
make meld ignore multiline-comments like
/*
 * ignorable
 * text
*/
I'm asking for help here.
Unfortunately the answer is: it can't. While the filter code in Meld
will happily accept a regex that covers (and removes) multiple lines,
this causes line mismatches between the text the diff sees and the
text that we display, so all of the change blocks will be wrong.

What's needed to make this work is a way of keeping track of what
we've filtered out of the text we give to the diff algorithm, and
adjusting the line offsets that the diff gives us back accordingly.
This probably isn't really hard... it's just fiddly and no one has
ever got around to doing it.

cheers,
Kai

Loading...