steve8x8 / geotoad

Geocaching query tool written in Ruby
https://buymeacoffee.com/steve8x8
Other
28 stars 8 forks source link

Parsing problem with GCFD21 #319

Closed steve8x8 closed 9 years ago

steve8x8 commented 9 years ago

As reported by "Susi Sorglos", GCFD21 crashed GeoToad 3.23.0. The problem has been investigated. The underlying problem is an inconsistency of GS' page creation: while all (well, virtually all, as I haven't checked all of them) printable pages carry the GC code in parentheses in the page "title", GCFD21 comes without these parentheses. The fix seems to be simple: in lib/details.rb, find the line that matches the "title" line, and append a "?" question mark to both escaped parentheses. The pattern part would then read (?(GC\w+))?:

<       if line =~ /<title.*>\((GC\w+)\) \s*(.*? by .*?)\s*</

---
>       if line =~ /<title.*>\(?(GC\w+)\)? \s*(.*? by .*?)\s*</
steve8x8 commented 9 years ago

Resolved in 3.23.1's code base