python-openxml/python-docx — pull request #71 by evandempsey (2014-06-27 22:32:20+00:00)
Title: add_text() on Paragraph

Someone opened an issue for this a while ago, so I implemented it. This method allows you to easily add new text to the end of a paragraph and continue the style of the last run.

I experimented with some different ways to do it and came to the conclusion that the following behaviour is the most intuitive:

If you call add_text(t) on an empty paragraph, it adds a run with the given text and no style.
If you call add_text(t) on a non-empty paragraph, it adds the text to the last run, keeping the style of the last run.

The .idea in .gitignore is for PyCharm project files. Probably worth having it in there.