We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 743e5d1 commit ebf4836Copy full SHA for ebf4836
2 files changed
lib/prawn_html/tags/a.rb
@@ -5,12 +5,13 @@ module Tags
5
class A < Tag
6
ELEMENTS = [:a].freeze
7
8
- def tag_styles
9
- return unless attrs.href
+ def extra_styles
+ attrs.href ? "href: #{attrs.href}" : nil
10
+ end
11
12
+ def tag_styles
13
<<~STYLES
14
color: #00E;
- href: #{attrs.href};
15
text-decoration: underline;
16
STYLES
17
end
spec/units/prawn_html/tags/a_spec.rb
@@ -11,7 +11,7 @@
it "styles doesn't include the link property" do
- expect(a.styles).to eq(color: 'ffbb11')
+ expect(a.styles).to eq(color: 'ffbb11', styles: [:underline])
0 commit comments