Skip to content

Add element.sourceline (lxml) #97

@SimonSapin

Description

@SimonSapin

Elements in lxml have a sourceline attribute, but it is always None in trees parsed with html5lib.

html5lib also appears to keep track of source line numbers for error messages.

I’d like to connect the two so that WeasyPrint can do its own error reporting based on line numbers of HTML elements. It seems like the attribute should be set in etree_lxml.py, but I don’t know how to access the input stream from there.

Suggestions?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy