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 12ab4fb commit d2b3fbbCopy full SHA for d2b3fbb
3 files changed
lib/docx/containers/paragraph.rb
@@ -41,7 +41,7 @@ def to_s
41
42
# Array of text runs contained within paragraph
43
def text_runs
44
- @node.xpath('w:r').map {|r_node| Containers::TextRun.new(r_node) }
+ @node.xpath('w:r|w:hyperlink/w:r').map {|r_node| Containers::TextRun.new(r_node) }
45
end
46
47
# Iterate over each text run within a paragraph
spec/docx/document_spec.rb
@@ -83,6 +83,10 @@
83
@doc.tables[0].columns[0].cells[5].text.should eq "aphids"
84
@doc.tables[0].columns[1].cells[5].text.should eq "puceron"
85
86
+
87
+ it "should read embedded links" do
88
+ @doc.tables[0].columns[1].cells[1].text.should =~ /^Directive/
89
+ end
90
91
92
describe 'editing' do
spec/fixtures/tables.docx
98 Bytes
0 commit comments