History

fastapi: add news entry

Simon Legner committed 4 years ago

Commit add806d1 parent 3f2cee92 files · +6 −17Browse files

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

Unified · Split

lib/docs/filters/fastapi/entries.rb+2−17
@@ -14,27 +14,12 @@ module Docs · 13 unmodified lines
1414 at_css('h1').content
1515 end
1616
17− def get_name_other
18− header = at_css('h1')
19− if header
20− header.content
21− else
22− path_parts.last.titleize
23− end
24− end
25−
2617 def get_type
2718 if path_parts.length <= 1
28− data = at_css('h1').content
19+ at_css('h1').content
2920 else
30− data = path_parts[0...path_parts.length-1].join(": ").titleize + ": " + at_css('h1').content
21+ path_parts[0...-1].join(": ").titleize + ": " + at_css('h1').content
3122 end
32−
33− data
34− end
35−
36− def path_count
37− path_parts.length
3823 end
3924
4025 def additional_entries