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 d5f70e7 commit 622a4a8Copy full SHA for 622a4a8
2 files changed
lib/docx/elements/bookmark.rb
@@ -30,7 +30,7 @@ def insert_multiple_lines(text_array)
30
# Remove text from paragraph
31
paragraph.blank!
32
paragraphs << paragraph
33
- for i in 0..(text_array.size - 1)
+ for i in 0...(text_array.size - 1)
34
# Copy previous paragraph
35
new_p = paragraphs[i].copy
36
# Insert as sibling of previous paragraph
@@ -48,7 +48,7 @@ def get_run_before
48
# at_xpath returns the first match found and preceding-sibling returns siblings in the
49
# order they appear in the document not the order as they appear when moving out from
50
# the starting node
51
- if (r_nodes = @node.xpath("./preceding-sibling::w:r"))
+ if not (r_nodes = @node.xpath("./preceding-sibling::w:r")).empty?
52
r_node = r_nodes.last
53
Containers::TextRun.new(r_node)
54
else
test/fixtures/~$diting.docx
-162 Bytes
0 commit comments