// LineMatch holds the matches within a single line in a file.
but it currently does not act as advertised.
Here is a test that runs a query containing a newline. It expects the resulting FileMatch structure to contain two LineMatches, one per line, but instead it gets back a single LineMatch containing two lines.
The doc comment for the
LineMatch
type saysbut it currently does not act as advertised.
Here is a test that runs a query containing a newline. It expects the resulting
FileMatch
structure to contain twoLineMatch
es, one per line, but instead it gets back a singleLineMatch
containing two lines.Here is the output of the test:
Fixing this would make it much easier for Sourcegraph to support multiline searches.
I'm happy to contribute a fix.