Skip to content

Commit 4586dfa

Browse files
committed
Update Redis documentation (up to 3.2.0)
1 parent cc60e8c commit 4586dfa

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

assets/stylesheets/pages/_redis.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
// Others
2121

22-
> h1, > h2, > .metadata, > h1 ~ p { margin-left: -1rem; }
22+
> h1, > h2, > .metadata, > h1 ~ p, > h1 + pre { margin-left: -1rem; }
2323
> h2 ~ p { margin-left: 0; }
2424

2525
> h2 { @extend %block-heading; }

lib/docs/filters/redis/clean_html.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@ module Docs
22
class Redis
33
class CleanHtmlFilter < Filter
44
def call
5-
at_css('ul')['class'] = 'commands' if root_page?
5+
if root_page?
6+
at_css('ul')['class'] = 'commands'
7+
else
8+
title = at_css('h1')
9+
title.after("<pre>#{title.content.strip}</pre>")
10+
title.content = title.content.split(' ').first
11+
end
612

713
css('nav', 'aside', 'form', '.anchor-link').remove
814

lib/docs/scrapers/redis.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Docs
22
class Redis < UrlScraper
33
self.type = 'redis'
4-
self.release = 'up to 3.0.7'
4+
self.release = 'up to 3.2.0'
55
self.base_url = 'http://redis.io/commands'
66
self.links = {
77
home: 'http://redis.io/',

0 commit comments

Comments
 (0)