Bump Nim to 2.0.2
Unified · Split
| @@ -16,8 +16,10 @@ module Docs · 15 unmodified lines | ||
| 16 | 16 | name.remove! ' User Guide' |
| 17 | 17 | name.remove! ' User\'s manual' |
| 18 | 18 | name.remove! %r{ \-.*} |
| 19 | + name.remove! %r{\Asrc/} | |
| 20 | + name.remove! %r{\Astd/} | |
| 19 | 21 | name.strip! |
| 20 | − name | |
| 22 | + name.split("/").last | |
| 21 | 23 | end |
| 22 | 24 | |
| 23 | 25 | def get_type |
| @@ -54,10 +56,11 @@ module Docs · 30 unmodified lines | ||
| 54 | 56 | else |
| 55 | 57 | |
| 56 | 58 | css('.simple-toc-section a, .nested-toc-section a').each do |node| |
| 57 | − entry_name = node.content | |
| 58 | − entry_name.gsub!(/,.*/, '') | |
| 59 | + match = /^`(.*)`|^(\w+)/.match(node.content) | |
| 60 | + entry_name = match[1] || match[2] | |
| 61 | + | |
| 59 | 62 | entry_id = slug + node['href'] |
| 60 | − entries << [entry_name, entry_id, name] | |
| 63 | + entries << ["#{entry_name} (#{name})", entry_id, name] | |
| 61 | 64 | end |
| 62 | 65 | |
| 63 | 66 | end |
| @@ -1,7 +1,6 @@ | ||
| 1 | 1 | module Docs |
| 2 | 2 | class Nim < UrlScraper |
| 3 | 3 | self.type = 'simple' |
| 4 | − self.release = '1.4.8' | |
| 5 | 4 | self.base_url = 'https://nim-lang.org/docs/' |
| 6 | 5 | self.root_path = 'overview.html' |
| 7 | 6 | self.links = { |
| @@ -14,10 +13,18 @@ module Docs · 6 unmodified lines | ||
| 14 | 13 | options[:skip] = %w(theindex.html docgen.html tut1.html tut2.html tut3.html tools.html) |
| 15 | 14 | |
| 16 | 15 | options[:attribution] = <<-HTML |
| 17 | − © 2006–2021 Andreas Rumpf<br> | |
| 16 | + © 2006–2024 Andreas Rumpf<br> | |
| 18 | 17 | Licensed under the MIT License. |
| 19 | 18 | HTML |
| 20 | 19 | |
| 20 | + version do | |
| 21 | + self.release = '2.0.2' | |
| 22 | + end | |
| 23 | + | |
| 24 | + version '1' do | |
| 25 | + self.release = '1.4.8' | |
| 26 | + end | |
| 27 | + | |
| 21 | 28 | def get_latest_version(opts) |
| 22 | 29 | doc = fetch_doc('https://nim-lang.org/docs/overview.html', opts) |
| 23 | 30 | doc.at_css('.container > .docinfo > tbody > tr:last-child > td').content.strip |