diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-01 11:26:10 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-01 11:26:10 +0000 |
| commit | dc381b5afcae0994094d49465142e6099dcec86c (patch) | |
| tree | 0624f7068dfb5ec9d6ffac0d94d488e93f842c3d /mammoth/documents.py | |
| parent | 68047ef381cb08cf43e5a30ca9dd6e40ccde8cdd (diff) | |
Add style_name to paragraphs
Diffstat (limited to 'mammoth/documents.py')
| -rw-r--r-- | mammoth/documents.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mammoth/documents.py b/mammoth/documents.py index 50b5e65..58e4f6b 100644 --- a/mammoth/documents.py +++ b/mammoth/documents.py @@ -1,7 +1,11 @@ import collections +def paragraph(children, style_name=None): + return Paragraph(children, style_name) + + Document = collections.namedtuple("Document", ["children"]) -Paragraph = collections.namedtuple("Paragraph", ["children"]) +Paragraph = collections.namedtuple("Paragraph", ["children", "style_name"]) Run = collections.namedtuple("Run", ["children"]) Text = collections.namedtuple("Text", ["value"]) |
