From d03c98e5517e89baef4a35a6dab2c5aa5a8541f9 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 3 Jan 2021 14:56:02 +0100 Subject: [PATCH] ocaml: fix module context in entries --- lib/docs/filters/ocaml/entries.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docs/filters/ocaml/entries.rb b/lib/docs/filters/ocaml/entries.rb index ebd3cb27..068faeba 100644 --- a/lib/docs/filters/ocaml/entries.rb +++ b/lib/docs/filters/ocaml/entries.rb @@ -35,7 +35,7 @@ module Docs def additional_entries entries = [] - module_node = css('h1').at_css('span') + module_node = at_css('h1') css('pre > span[id]').each do |span| if span['id'].start_with?('VAL') @@ -49,7 +49,7 @@ module Docs end name = span.content - name += " [#{module_node.content}]" unless module_node.nil? + name += " [#{module_node.content}]" if module_node entries << [name, span['id'], entry_type] end entries