This can be replicated with the following test:
def test_scalp_does_not_error
a = VAExtractor.new
a.extract('SCALP ') # the 'LP ' will be captured
end
The regular expression incorrectly identifies some text as a potential VA score. If no VA score is found, these will raise an ErrorLateralityNotFound. (E.g., "LP " is captured.)
|
raise ErrorLateralityNotFound |
NB: Under the current code, other errors may occur before since boundary conditions aren't checked, but this is the underlying issue. (E.g.,
|
lat = searchpriorlines(lines[i-3..i-1].reverse) |
)
This can be replicated with the following test:
The regular expression incorrectly identifies some text as a potential VA score. If no VA score is found, these will raise an
ErrorLateralityNotFound. (E.g., "LP " is captured.)vaextractor/lib/vaextractor.rb
Line 211 in d7c7261
NB: Under the current code, other errors may occur before since boundary conditions aren't checked, but this is the underlying issue. (E.g.,
vaextractor/lib/vaextractor.rb
Line 179 in d7c7261