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
3 class CleanHtmlFilter < Filter3 class CleanHtmlFilter < Filter
4 def call4 def call
5 5
6 css('#sidebar').remove
7
6 css('pre').each do |node|8 css('pre').each do |node|
7 span = node.at_css('span[id]')9 span = node.at_css('span[id]')
8 node['id'] = span['id'] if span10 node['id'] = span['id'] if span
lib/docs/scrapers/ocaml.rb+9−4
@@ -1,5 +1,5 @@
1module Docs1module Docs
2 class Ocaml < FileScraper2 class Ocaml < UrlScraper
3 self.name = 'OCaml'3 self.name = 'OCaml'
4 self.type = 'ocaml'4 self.type = 'ocaml'
5 self.root_path = 'index.html'5 self.root_path = 'index.html'
@@ -16,15 +16,20 @@ module Docs · 10 unmodified lines
16 16
17 options[:skip_patterns] = [17 options[:skip_patterns] = [
18 /\Acompilerlibref\//,18 /\Acompilerlibref\//,
19 /\Alibref\/type_/,19 /\Aapi\/type_/,
20 /\Alibref\/Stdlib\.\w+\.html/,20 /\Aapi\/Stdlib\.\w+\.html/,
21 ]21 ]
22 22
23 options[:attribution] = <<-HTML23 options[:attribution] = <<-HTML
24 &copy; 1995-2022 INRIA.24 &copy; 1995-2024 INRIA.
25 HTML25 HTML
26 26
27 version '' do27 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
28 self.release = '5.0'33 self.release = '5.0'
29 self.base_url = "https://v2.ocaml.org/releases/#{self.release}/htmlman/"34 self.base_url = "https://v2.ocaml.org/releases/#{self.release}/htmlman/"
30 end35 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