summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2023-04-13 23:54:38 -0600
committerDan Allen <dan.j.allen@gmail.com>2023-04-14 02:15:58 -0600
commitc2e320d33786e2e69186d3b26f0520fe81cbba4c (patch)
tree5dc2906c94236b6988c7f8f954c13b10a372ea29 /spec
parent6d8c51061423c0ece23187f4d09b5767bbba32cd (diff)
do not insert break opportunities into bare URL with nobreak role
Diffstat (limited to 'spec')
-rw-r--r--spec/link_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/link_spec.rb b/spec/link_spec.rb
index daa58f07..dae1db2f 100644
--- a/spec/link_spec.rb
+++ b/spec/link_spec.rb
@@ -110,6 +110,15 @@ describe 'Asciidoctor::PDF::Converter - Link' do
(expect lines[1]).to eql 'https://goo.gl/search/asciidoctor'
end
+ it 'should not split bare URL with nobreak role' do
+ pdf = to_pdf <<~'END', analyze: true
+ this line contains a URL that falls at the end of the line that is not split https://goo.gl/search/asciidoctor[role=nobreak]
+ END
+ lines = pdf.lines
+ (expect lines).to have_size 2
+ (expect lines[1]).to eql 'https://goo.gl/search/asciidoctor'
+ end
+
it 'should reveal URL of link when media=print or media=prepress' do
%w(print prepress).each do |media|
pdf = to_pdf <<~'END', attribute_overrides: { 'media' => media }, analyze: true