summaryrefslogtreecommitdiff
path: root/spec/formatted_text_formatter_spec.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2020-08-27 02:04:40 -0600
committerGitHub <noreply@github.com>2020-08-27 02:04:40 -0600
commitcacfb8113650e5720f91114bbd443184d75df2a9 (patch)
tree3c67ac8034a92b872b0d370c8207a064ec246c08 /spec/formatted_text_formatter_spec.rb
parentb2a50a56aab01b69494a5388faee38cd71377355 (diff)
resolves #1705 allow theme to control background color and border offset for links (PR #1758)
Diffstat (limited to 'spec/formatted_text_formatter_spec.rb')
-rw-r--r--spec/formatted_text_formatter_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/formatted_text_formatter_spec.rb b/spec/formatted_text_formatter_spec.rb
index 3e28de87..37641a51 100644
--- a/spec/formatted_text_formatter_spec.rb
+++ b/spec/formatted_text_formatter_spec.rb
@@ -722,6 +722,15 @@ describe Asciidoctor::PDF::FormattedText::Formatter do
(expect max_text[:font_size].to_f).to eql 21.0
end
+ it 'should add background to link as defined in theme', visual: true do
+ pdf_theme = {
+ link_background_color: 'EFEFEF',
+ link_border_offset: 1,
+ }
+ to_file = to_pdf_file 'Check out https://asciidoctor.org[Asciidoctor].', 'text-formatter-link-background.pdf', pdf_theme: pdf_theme
+ (expect to_file).to visually_match 'text-formatter-link-background.pdf'
+ end
+
it 'should allow custom role to override styles of link' do
pdf_theme = {
heading_font_color: '000000',