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

savehtml adds an extra html tag #37

Open
tp2750 opened this issue Jun 17, 2021 · 0 comments
Open

savehtml adds an extra html tag #37

tp2750 opened this issue Jun 17, 2021 · 0 comments

Comments

@tp2750
Copy link
Contributor

tp2750 commented Jun 17, 2021

Problem

When calling savehtml() it adds an extra layer of <html></html> on top of what is already there.

To reproduce:

julia> using Hyperscript

julia> doc1 = m("html", m("h1", "Hello"))
<html><h1>Hello</h1></html>

julia> savehtml("/tmp/doc1.html", doc1) ## html html
56

shell> cat /tmp/doc1.html
<!doctype html>
<html><html><h1>Hello</h1></html></html>

Expected behavior

I would expect the content of the file written by savehtml to be the same as printed, except for an added doctype.

Versions

(@v1.6) pkg> status Hyperscript
      Status `~/.julia/environments/v1.6/Project.toml`
  [47d2ed2b] Hyperscript v0.0.4

julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)

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

1 participant