Permalink
Browse files

[TIDOC-613] Support merged platform/since tag.

  • Loading branch information...
Arthur Evans
Arthur Evans committed Aug 27, 2012
1 parent 8482d3a commit 88a208e1997f4228da51961e5521bd5c09ce92f6
Showing with 7 additions and 3 deletions.
  1. +7 −3 meta/PlatformsTag.rb
View
@@ -8,12 +8,16 @@ def initialize
# One can make use of the #format method to easily support
# Markdown and {@link} tags inside the contents of the tag.
def to_html(platforms)
- names = {
+ pretty_names = {
'android' => 'Android',
'iphone' => 'iPhone',
'ipad' => 'iPad',
'mobileweb' => 'Mobile Web'
}
- "<ul class='platforms'>" + platforms.map{|platform| "<li class='platform-"+platform+"' title='"+names[platform]+"'></li>"}.join("") + "</ul>"
+ "<ul class='platforms'>" + platforms.map{|platform|
+ name, version = platform.split()
+ "<li class='platform-"+name+"'
+ title='"+pretty_names[name]+"'>"+version+"</li>"
+ }.join("") + "</ul>"
end
-end
+end

0 comments on commit 88a208e

Please sign in to comment.