Skip to content

Commit

Permalink
Merge pull request #2 from abbasou/abbasou-patch-2-remove-spaces-in-url
Browse files Browse the repository at this point in the history
Remove spaces in Book names for URL tim-hub#185
  • Loading branch information
abbasou committed May 12, 2024
2 parents 10d1dcc + ecdb0df commit a7b9eb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/provider/BibleAPIDotComProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class BibleAPIDotComProvider extends BaseBibleAPIProvider {
verses: number[],
versionName?: string
): string {
let queryString = `${bookName}+${chapter}:`.replace(/ /g, '+')
let queryString = `${bookName}+${chapter}:`
queryString += this.convertVersesToQueryString(verses)
this._currentQueryUrl = `${this._apiUrl}/${queryString}?translation=${
versionName
Expand All @@ -31,7 +31,7 @@ export class BibleAPIDotComProvider extends BaseBibleAPIProvider {
}`

// setup the bible gateway url
this.bibleGatewayUrl = this.buildBibleGatewayUrl(bookName, chapter, verses)
this.bibleGatewayUrl = this.buildBibleGatewayUrl(bookName, chapter, verses).replace(/ /g, "+") // Remove spaces in Book names for URL.
return this._currentQueryUrl
}

Expand Down

0 comments on commit a7b9eb4

Please sign in to comment.