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

Line number of tokens is wrong when <style> tags exists #338

Closed
stollr opened this issue Jun 18, 2018 · 2 comments
Closed

Line number of tokens is wrong when <style> tags exists #338

stollr opened this issue Jun 18, 2018 · 2 comments
Labels

Comments

@stollr
Copy link

stollr commented Jun 18, 2018

If there are style tags in the html, they are removed from the html before the lexing process starts. This results in wrong line numbers for the tokens.

Usually this is no problem, but if there is an error in the html (e.g. tags are closed in a wrong order) and you try to find the error the wrong line number makes it more difficult.

imho there are two solutions:

  1. Replace the style content with new lines of the same number than they exists in the removed style contend
  2. Don't remove the style tags and their content. Just don't print it to the PDF.
@spipu spipu added the bug label Jul 31, 2018
@spipu
Copy link
Owner

spipu commented Jul 31, 2018

thanks, i will check this

@spipu
Copy link
Owner

spipu commented Jul 31, 2018

it will be fixed in the next release

@spipu spipu closed this as completed Jul 31, 2018
icebird93 pushed a commit to EduBase/html2pdf that referenced this issue Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants