Skip to content

Commit

Permalink
Merge pull request #189 from abbasou/abbasou-patch-2-remove-spaces-in…
Browse files Browse the repository at this point in the history
…-url

Fix spaces in book names for URLs
  • Loading branch information
tim-hub authored May 13, 2024
2 parents 10d1dcc + ecdb0df commit c5be0fb
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 c5be0fb

Please sign in to comment.