Browse Source

Don't add class="" if we don't need to

main
Paul O’Shannessy 9 years ago
parent
commit
a46d2bf5d0
  1. 2
      _plugins/sidebar_item.rb

2
_plugins/sidebar_item.rb

@ -11,7 +11,7 @@ module Jekyll
if item["href"]
classes.push("external")
end
className = classes.size ? "class=\"#{classes.join(' ')}\"" : "";
className = classes.size > 0 ? " class=\"#{classes.join(' ')}\"" : ""
return "<a href=\"#{href}\"#{className}>#{item["title"]}</a>"
end

Loading…
Cancel
Save