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.
2 parents b928484 + c042502 commit 140e6f9Copy full SHA for 140e6f9
3 files changed
lib/docx/containers/text_run.rb
@@ -95,7 +95,11 @@ def underlined?
95
end
96
97
def hyperlink?
98
- @node.name == 'hyperlink'
+ @node.name == 'hyperlink' && external_link?
99
+ end
100
+
101
+ def external_link?
102
+ !@node.attributes['id'].nil?
103
104
105
def href
spec/docx/document_spec.rb
@@ -522,4 +522,13 @@
522
523
524
525
+ describe '#to_html' do
526
+ before do
527
+ @doc = Docx::Document.open(@fixtures_path + '/internal-links.docx')
528
529
530
+ it 'should not raise error' do
531
+ expect { @doc.to_html }.to_not raise_error
532
533
534
spec/fixtures/internal-links.docx
9.62 KB
0 commit comments