Skip to content

Commit

Permalink
filter for sdk tab only
Browse files Browse the repository at this point in the history
  • Loading branch information
zzhaobraze committed Sep 13, 2024
1 parent 1eae1bd commit 5e3a85e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _plugins/sdktabs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def initialize(tag_name, tabonly = 'false', tokens)
end
end
def render(context)
tabs = super.scan(/data\-tab=\"(.*?)\"/)
tabs = super.scan(/data\-tab=\"sdk\-(.*?)\"/)
tabslist = '<ul class="sdk-ab-nav sdk-ab-nav-tabs ' + @tabclass + '_ul" id="' + @tabid + '_nav">' + "\n"
if tabs.length > 0
tabs.each_with_index do |tab, ind|
Expand Down Expand Up @@ -50,7 +50,7 @@ def render(context)
content = content.strip # Strip again to avoid "\n"
tabslug = @tab.gsub(' ', '-').gsub(/[^\w-]/, '')

return '<div class="sdk-ab-tab-pane ' + tabslug + '_tab " data-tab="' + @tab + '">' + content + "</div>"
return '<div class="sdk-ab-tab-pane ' + tabslug + '_tab " data-tab="sdk-' + @tab + '">' + content + "</div>"
end
end

Expand Down

0 comments on commit 5e3a85e

Please sign in to comment.