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

Is it possible to get the original doctype? #11

Closed
da99 opened this issue Sep 23, 2018 · 2 comments
Closed

Is it possible to get the original doctype? #11

da99 opened this issue Sep 23, 2018 · 2 comments

Comments

@da99
Copy link

da99 commented Sep 23, 2018

The original HTML content is

  origin = <<-HTML
    <!doctype html>
    <html lang="en">
      <head>
       <title></title>
      </head>
      <body> </body>
  </html>
  HTML

But, I can't get it to print out the DOCTYPE after parsing:

    puts MyHTML::Parser.new(origin).root!.to_html

Is there a way to put out the full HTML with a doctype?

@kostya kostya closed this as completed in 727e8ae Sep 23, 2018
@kostya
Copy link
Owner

kostya commented Sep 23, 2018

i added method:

puts MyHTML::Parser.new(origin).to_html

@da99
Copy link
Author

da99 commented Sep 26, 2018

Thank you very much. The MyHTML is now perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants