Unified · Split
| @@ -52,8 +52,8 @@ module Docs · 51 unmodified lines | ||
| 52 | 52 | end |
| 53 | 53 | |
| 54 | 54 | def get_latest_version(opts) |
| 55 | − body = fetch('https://crystal-lang.org/api', opts) | |
| 56 | − body.scan(/Crystal Docs ([0-9.]+)/)[0][0] | |
| 55 | + doc = fetch_doc('https://crystal-lang.org/', opts) | |
| 56 | + doc.at_css('.latest-release').content.scan(/([0-9.]+)/)[0][0] | |
| 57 | 57 | end |
| 58 | 58 | end |
| 59 | 59 | end |