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 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 Kozea#434, Kozea#970.
@liZe
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
@liZe liZe added this to the 51 milestone Nov 8, 2019
@liZe liZe added the feature New feature that should be supported label Nov 8, 2019
@Tontyna Tontyna deleted the box-element branch November 8, 2019 16:14
@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
Labels
feature New feature that should be supported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants