mlinksva / language-wdiff

Highlight wdiff output in .wdiff file in Atom editor
https://atom.io/packages/language-wdiff
The Unlicense
2 stars 0 forks source link

Linebreak bug #8

Open ldemattos opened 7 years ago

ldemattos commented 7 years ago

Dear @mlinksva ,

There is an issue when a line break is found between {++} or [--].

The regex [-[\s\S]*?-] solves this when using the ATOM find menu. However, it does not work when placed in wdiff.cson . It seems that ATOM's regex is somewhat different.

Thanks in advance, LMNM.

mlinksva commented 7 years ago

I expected this, see #3 which also has a workaround depending what you're using to produce wdiff (if the wdiff command, the -n flag causes fields not to extend across newlines).

It's due to grammar regexes never matching across multiple lines, as described at https://github.com/atom/first-mate/issues/57

To fix this issue a nested pattern is probably needed. I haven't tried yet. I'm not sure when I'll get to it, but pull requests are welcome. :smile: