Permalink
Browse files

Fix: Don't show deprecated or removed attributes in 'Attributes' sect…

…ion of the manual.

Reported-by: Carl Worth
  • Loading branch information...
1 parent adfce72 commit fde0a1c28ccf68cd0e7cd860f818eb27fa201ba6 @scrapper scrapper committed Apr 5, 2012
Showing with 19 additions and 7 deletions.
  1. +19 −7 lib/taskjuggler/KeywordDocumentation.rb
@@ -545,17 +545,18 @@ def generateHTMLArgumentsLine
end
def generateHTMLContextLine
- if @contexts.empty?
+ descr = []
+ @contexts.each do |c|
+ next if [ :deprecated, :removed ].include?(c.pattern.supportLevel)
+
+ descr << ', ' unless descr.empty?
+ descr << A.new('href' => "#{c.keyword}.html") { c.title }
+ end
+ if descr.empty?
descr = A.new('href' =>
'Getting_Started.html#Structure_of_a_TJP_File') do
'Global scope'
end
- else
- descr = []
- @contexts.each do |c|
- descr << ', ' unless descr.empty?
- descr << A.new('href' => "#{c.keyword}.html") { c.title }
- end
end
generateHTMLTableLine('Context', descr)
end
@@ -564,6 +565,8 @@ def generateHTMLAlsoLine
unless @seeAlso.empty?
descr = []
@seeAlso.each do |a|
+ next if [ :deprecated, :removed ].include?(a.pattern.supportLevel)
+
descr << ', ' unless descr.empty?
descr << A.new('href' => "#{a.keyword}.html") { a.title }
end
@@ -629,6 +632,10 @@ def generateHTMLOptionalAttributesBox
end
@optionalAttributes.each do |attr|
+ if [ :deprecated, :removed ].include?(attr.pattern.supportLevel)
+ next
+ end
+
rows << TR.new('align' => 'left') do
[
TD.new('align' => 'left', 'class' => 'descr') do
@@ -657,6 +664,11 @@ def generateHTMLOptionalAttributesBox
TD.new('class' => 'descr', 'style' => 'width:84%') do
list = []
@optionalAttributes.each do |attr|
+ if [ :deprecated, :removed ].
+ include?(attr.pattern.supportLevel)
+ next
+ end
+
list << ', ' unless list.empty?
list << A.new('href' => "#{attr.keyword}.html") do
attr.title

0 comments on commit fde0a1c

Please sign in to comment.