Skip to content

Commit 8b547b2

Browse files
committed
Use correct method insert_text_after.
Afaik the `insert_after` does not work, when i changed my code to use `insert_text_after` it worked. So changed the documentation to match that.
1 parent 122220d commit 8b547b2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ require 'docx'
6868
doc = Docx::Document.open('example.docx')
6969

7070
# Insert a single line of text after one of our bookmarks
71-
doc.bookmarks['example_bookmark'].insert_after("Hello world.")
71+
doc.bookmarks['example_bookmark'].insert_text_after("Hello world.")
7272

7373
# Insert multiple lines of text at our bookmark
7474
doc.bookmarks['example_bookmark_2'].insert_multiple_lines_after(['Hello', 'World', 'foo'])
@@ -104,4 +104,4 @@ p_child = p_element.at_xpath("//child::*") # selects first child
104104
* Default formatting of inserted elements to inherited values
105105
* Implement formattable elements.
106106
* Implement styles.
107-
* Easier multi-line text insertion at a single bookmark (inserting paragraph nodes after the one containing the bookmark)
107+
* Easier multi-line text insertion at a single bookmark (inserting paragraph nodes after the one containing the bookmark)

0 commit comments

Comments
 (0)