Fix "ff" parsing.
This commit is contained in:
parent
55d9f2d482
commit
13c2e33055
1 changed files with 5 additions and 6 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue