Search for a string ignoring comments

20 görüntüleme
İlk okunmamış mesaja atla

Roland Smith

okunmadı,
9 Eyl 2017 20:27:419.09.2017
alıcı scintilla-interest
Is it possible to search for a string and have it ignore hits that are 'commented out' according to the comment rules of the current language?

If not, could there be a new search flag be added that would tell SCI_SEARCHINTARGET to ignore comments?

Thanks

Neil Hodgson

okunmadı,
10 Eyl 2017 00:00:0410.09.2017
alıcı scintilla...@googlegroups.com
Roland Smith:

> Is it possible to search for a string and have it ignore hits that are 'commented out' according to the comment rules of the current language?

You can filter search hits in your application code.

> If not, could there be a new search flag be added that would tell SCI_SEARCHINTARGET to ignore comments?

There are multiple aspects to this which would have to be defined: which styles are to be ignored; whether text that matches partly in comment and partly out are hits; whether a comment should be regarded as breaking any match or if a match can go over an ignored comment (for example, a regex that matches function parameters could reasonably include ignored comment text); and I’m sure there are others.

Neil

Tümünü yanıtla
Yazarı yanıtla
Yönlendir
0 yeni ileti