History

Update OCaml documentation (5.2)

Simon Legner committed 1 year ago

Commit 2b8d9b61 parent 6ccf04a3 files · +11 −15Browse files

Showing the changes to lib/docs (2 of 3 files). Show all

Unified · Split

2 files
  1. lib/docs/filters/ocaml/clean_html.rb +2 −0
  2. lib/docs/scrapers/ocaml.rb +9 −4
lib/docs/filters/ocaml/clean_html.rb+2−0
@@ -3,6 +3,8 @@ module Docs · 2 unmodified lines
33 class CleanHtmlFilter < Filter
44 def call
55
6+ css('#sidebar').remove
7+
68 css('pre').each do |node|
79 span = node.at_css('span[id]')
810 node['id'] = span['id'] if span
lib/docs/scrapers/ocaml.rb+9−4
@@ -1,5 +1,5 @@
11 module Docs
2− class Ocaml < FileScraper
2+ class Ocaml < UrlScraper
33 self.name = 'OCaml'
44 self.type = 'ocaml'
55 self.root_path = 'index.html'
@@ -16,15 +16,20 @@ module Docs · 10 unmodified lines
1616
1717 options[:skip_patterns] = [
1818 /\Acompilerlibref\//,
19− /\Alibref\/type_/,
20− /\Alibref\/Stdlib\.\w+\.html/,
19+ /\Aapi\/type_/,
20+ /\Aapi\/Stdlib\.\w+\.html/,
2121 ]
2222
2323 options[:attribution] = <<-HTML
24− &copy; 1995-2022 INRIA.
24+ &copy; 1995-2024 INRIA.
2525 HTML
2626
2727 version '' do
28+ self.release = '5.2'
29+ self.base_url = "https://ocaml.org/manual/#{self.release}/"
30+ end
31+
32+ version '5.0' do
2833 self.release = '5.0'
2934 self.base_url = "https://v2.ocaml.org/releases/#{self.release}/htmlman/"
3035 end

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t