From 29862ce27303107935de6df4f85dd7fd610f19e2 Mon Sep 17 00:00:00 2001 From: nick evans Date: Wed, 16 Nov 2022 14:11:08 -0500 Subject: [ruby/rdoc] Darkfish: group method call-seq in div.method-header This way, custom CSS styles can be easily applied to the entire method header at once. Otherwise, it can be tricky to make a border that goes around the entire set of method call-seq, but not the method description. https://github.com/ruby/rdoc/commit/5db4bce01e --- lib/rdoc/generator/template/darkfish/class.rhtml | 42 +++++++++++++----------- 1 file changed, 22 insertions(+), 20 deletions(-) (limited to 'lib/rdoc') diff --git a/lib/rdoc/generator/template/darkfish/class.rhtml b/lib/rdoc/generator/template/darkfish/class.rhtml index 5d7b6a1b80..97d175dddc 100644 --- a/lib/rdoc/generator/template/darkfish/class.rhtml +++ b/lib/rdoc/generator/template/darkfish/class.rhtml @@ -98,28 +98,30 @@ <%- methods.each do |method| -%>
"> - <%- if (call_seq = method.call_seq) then -%> - <%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%> -
- - <%= h(call_seq.strip. - gsub( /^\w+\./m, '')). - gsub(/(.*)[-=]>/, '\1→') %> - - <%- if i == 0 and method.token_stream then -%> - click to toggle source - <%- end -%> -
- <%- end -%> - <%- else -%> -
- <%= h method.name %><%= h method.param_seq %> - <%- if method.token_stream then -%> - click to toggle source +
+ <%- if (call_seq = method.call_seq) then -%> + <%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%> +
+ + <%= h(call_seq.strip. + gsub( /^\w+\./m, '')). + gsub(/(.*)[-=]>/, '\1→') %> + + <%- if i == 0 and method.token_stream then -%> + click to toggle source + <%- end -%> +
+ <%- end -%> + <%- else -%> +
+ <%= h method.name %><%= h method.param_seq %> + <%- if method.token_stream then -%> + click to toggle source + <%- end -%> +
<%- end -%>
- <%- end -%>
<%- if method.comment then -%> -- cgit v1.2.3