There are two issues with the current implementation, which can be seen in
|
it('works for reference without chapter (initial implementation)', async () => { |
|
await testRecognition( |
|
`<p data-bx-context="Matt"> |
|
Check out verse 9 and then 6:10 (cf. Luke 11:2) |
|
and verse 11. |
|
</p>`, |
|
['verse 9', '6:10', 'Luke 11:2', 'verse 11'], |
|
['Matt.1.9', 'Matt.6.10', 'Luke.11.2', 'Matt.1.11'] |
|
); |
|
}); |
|
|
|
xit('works for reference without chapter (final implementation)', async () => { |
|
await testRecognition( |
|
`<p data-bx-context="Matt"> |
|
Check out verse 9 and then 6:10 (cf. Luke 11:2) |
|
and verse 11. |
|
</p>`, |
|
['6:10', 'Luke 11:2', 'verse 11'], |
|
['Matt.6.10', 'Luke.11.2', 'Matt.6.11'] |
|
); |
|
}); |
As the given context does not contain a chapter:
- chapter-less references within the section should take their chapter from any previously recognised passage in that section (rather than the chapter 1 supplied to the chapter-less context to allow parsing)
- if a chapter-less reference has no preceding recognised passage, it should be skipped
There are two issues with the current implementation, which can be seen in
blinx.js/src/blinx.class.spec.ts
Lines 241 to 261 in 72d8184
As the given context does not contain a chapter: