Skip to content

Commit

Permalink
Keep major/minor only for api pages
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianrbz committed Dec 2, 2024
1 parent d61d9d7 commit 0acae50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/_plugins/drops/oas/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def <=>(other)

def value
@value ||= if Gem::Version.correct?(name)
if name.match?(/^(\d+\.\d+\.\d+)\.\d+$/)
name.sub(/^(\d+\.\d+\.\d+)\.\d+$/, '\1')
if name.match?(/^\d+\.\d+\.\d+\.\d+$/)
name.sub(/^(\d+\.\d+)\.\d+\.\d+$/, '\1')
else
name.sub(/^(\d+\.\d+)\.\d+$/, '\1')
end
Expand Down

0 comments on commit 0acae50

Please sign in to comment.