diff options
Diffstat (limited to 'mammoth/documents.py')
| -rw-r--r-- | mammoth/documents.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mammoth/documents.py b/mammoth/documents.py index 1adcc0d..9028b03 100644 --- a/mammoth/documents.py +++ b/mammoth/documents.py @@ -8,7 +8,7 @@ Run = dodge.data_class("Run", [ "is_underline", "vertical_alignment", ]) Text = dodge.data_class("Text", ["value"]) -Hyperlink = dodge.data_class("Hyperlink", ["href", "children"]) +Hyperlink = dodge.data_class("Hyperlink", ["href", "anchor", "children"]) Table = dodge.data_class("Table", ["children"]) TableRow = dodge.data_class("TableRow", ["children"]) TableCell = dodge.data_class("TableCell", ["children"]) @@ -55,7 +55,11 @@ def tab(): image = Image -hyperlink = Hyperlink + +def hyperlink(children, href=None, anchor=None): + return Hyperlink(href, anchor, children) + + table = Table table_row = TableRow table_cell = TableCell |
