Fix "ff" parsing.

This commit is contained in:
Benjamin A. Shelton 2026-08-24 21:40:22 -06:00
commit 13c2e33055
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01

View file

@ -62,7 +62,6 @@ class Refs {
const bt = bookTransforms[this._book];
if ('match' in bt) {
if ('ts' in bt.match && this._ts.indexOf(bt.match.ts) == -1) {
console.log('not matched');
return this.getChapter();
}
}
@ -74,14 +73,14 @@ class Refs {
return this.getChapter();
}
getVerse() {
if (typeof(this._verse) === 'string' && this._verse.endsWith('ff')) {
return [parseInt(this._verse.substring(0, this._verse.length-2)), 'ff'];
}
if (typeof(this._verse) === 'number' || (typeof(this._verse) === 'string' && this._verse.indexOf('-') == -1)) {
return parseInt(this._verse);
}
if (typeof(this._verse) === 'string' && this._verse.endsWidth('ff')) {
return [parseInt(this._verse.substr(0, this._verse.length-2)), 'ff'];
}
return [parseInt(this._verse.substr(0, this._verse.indexOf('-'))),
parseInt(this._verse.substr(this._verse.indexOf('-')+1))];
return [parseInt(this._verse.substring(0, this._verse.indexOf('-'))),
parseInt(this._verse.substring(this._verse.indexOf('-')+1))];
}
get verse() {
if (this._book in bookTransforms) {