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