Conversation
pydocx/DocxParser.py
Outdated
There was a problem hiding this comment.
This name is not very clear. From the comment, it looks like what we're actually doing is only grabbing items if they at least have a child that might have some text. Is that correct? Can we move this logic to a separate method called maybe _get_children_with_content?
I would also recommend creating a constant like TAGS_CONTAINING_CONTENT that's a list of drawing, t, pict etc. instead of just a bunch of if statements with some tag names that seem to come from out of the blue.
Also, is there a tag that corresponds to delText like insText or something like that? Does that matter? I'm also a bit confused on why something with just deltText would break things here. If all it contained was deleted text, do we want to include its parent element at all?
Conflicts: pydocx/tests/test_xml.py
There was a problem hiding this comment.
Where is the author and date stuff coming from? Those aren't valid HTML attributes
There was a problem hiding this comment.
Also, I'm surprised by the <br /> here. If I had change tracking on and typed BBB after the AAA, I would actually be trying to type AAABBB on one line. If I typed BBB I would be trying to type AAA BBB on the same line. Is there something I'm not understanding about the way Word records the track changes?
There was a problem hiding this comment.
This is existing behaviour and has nothing to do with this ticket. #30 will deal with that.
There was a problem hiding this comment.
Yuck. "Existing behavior" is not a great justification for adding another bug, but I understand wanting to break it up. Seems odd to do for such a small ticket, though. Your call, so this would be done if you're cool with it.
There was a problem hiding this comment.
I am not certain how complicated it will be, and it would be much simpler to handle it as a separate issue.
Ordering bug with deleted text in a list
Ordering bug with deleted text in a list
Ordering bug with deleted text in a list
My first attempt at making a test for #23 resulted in finding an ordering bug. Lovely.