Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add html element to Box class #972

Merged
merged 1 commit into from Nov 8, 2019
Merged

Add html element to Box class #972

merged 1 commit into from Nov 8, 2019

Conversation

@Tontyna
Copy link
Contributor

Tontyna commented Oct 17, 2019

Unless the Box is a PageBox or a MarginBox the new attribute element points to the html element (xml.etree.ElementTree.Element) where the Box stems from.
This enables e.g. post-processing that depends on Element attributes, like 'class' or 'id'.

Caution: Elements with no subelements will test as False! Test the element's existence with if box.element is not None:.

Related to #434, #970.

Unless the Box is a PageBox or a MarginBox the new attribute `element` points
to the html element (xml.etree.ElementTree.Element) where the Box stems from.
This enables e.g. post-processing that depends on Element attributes, like
'class' or 'id'.

Caution: Elements with no subelements will test as False! Test the element's
existence with `if box.element is not None:`.

Related to #434, #970.
@liZe

This comment has been minimized.

Copy link
Member

liZe commented Nov 8, 2019

Related to #434, #970.

It gives a lot of post-processing possibilities, it doesn't change anything for memory consumption, let's merge!

@liZe liZe merged commit 05a9513 into Kozea:master Nov 8, 2019
1 check failed
1 check failed
continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@liZe liZe added this to the 51 milestone Nov 8, 2019
@liZe liZe added the feature label Nov 8, 2019
@Tontyna Tontyna deleted the Tontyna:box-element branch Nov 8, 2019
@liZe liZe mentioned this pull request Dec 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.