diff --git a/CHANGELOG.md b/CHANGELOG.md index 99ef2b1..fbbe5c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ -# Bible Gateway to Markdown Script CHANGELOG +# Bible Gateway to Markdown Script + +## CHANGELOG + +### v1.5.0, 29.1.2024 +- [Fix] Cope with BibleGateway's change to their output pages, which meant missing heading and unwanted extra text on the end of bg2md's output +- [Fix] With some options, verses could be omitted when the range included two successive chapters ### v1.4.7, 12.8.2023 - [Fix] Extend request fetch timeouts for slower connections and connectivity issues diff --git a/bg2md.rb b/bg2md.rb index a1a3434..635dd56 100755 --- a/bg2md.rb +++ b/bg2md.rb @@ -3,11 +3,10 @@ # BibleGateway passage lookup and parser to Markdown # - Jonathan Clark, v1.5.0, 29.1.2024 #------------------------------------------------------------------------------ -# Uses BibleGateway.com's passage lookup tool to find a passage and turn it into -# Markdown usable in other ways. It passes 'reference' through to the BibleGateway -# parser to work out what range of verses should be included. -# The reference term is concatenated to remove spaces, meaning it doesn't need to be -# 'quoted'. It does not yet support multiple passages. +# Uses BibleGateway.com's passage lookup tool to find a passage and turn it into Markdown usable in other ways. +# It passes 'reference' through to the BibleGateway parser to work out what range of verses should be included. +# The reference term is concatenated to remove spaces, meaning it doesn't need to be 'quoted'. +# It does not yet support multiple passages. # # The Markdown output includes: # - passage reference @@ -30,7 +29,6 @@ # - all

meta-chapter titles,
, most s #------------------------------------------------------------------------------ # TODO: -# - Allow spanning of more than one chapter # - Decide whether to support returning more than one passage (e.g. "Mt1.1;Jn1.1") #------------------------------------------------------------------------------ # Ruby String manipulation docs: https://ruby-doc.org/core-2.7.1/String.html#method-i-replace @@ -51,11 +49,12 @@ # Regular expressions used to detect various parts of the HTML to keep and use START_READ_CONTENT_RE = '

'.freeze # seem to see both versions of this -- perhaps Jude is an outlier? -END_READ_CONTENT_RE = '^