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

Untagged text is absent from rendered output #3027

Closed
gurjeet opened this issue Jun 14, 2019 · 5 comments · Fixed by #3102
Closed

Untagged text is absent from rendered output #3027

gurjeet opened this issue Jun 14, 2019 · 5 comments · Fixed by #3102
Labels

Comments

@gurjeet
Copy link

gurjeet commented Jun 14, 2019

The first line of the HTML (Hello there) is not contained in any tags, so it does not show up in the rendered output. The bug is reproducible on repl.

https://svelte.dev/repl/ac3e6448a4a04ed9a12e0ceed1d9dfae?version=3.5.1

Hello there.

<script>
	let name = 'world';
</script>

<h1>Hello {name}!</h1>
@Conduitry Conduitry added the bug label Jun 14, 2019
@bwbroersma
Copy link
Contributor

Good find, the Hello there. is present in the SSR output & hydrate claim.

@Panya
Copy link
Contributor

Panya commented Jun 16, 2019

I think it's because of the order of the text and script tag. If you place all markup before or after the script all work as expected (repl). Not sure that this is a bug.

@gurjeet
Copy link
Author

gurjeet commented Jun 16, 2019

@Panya I'd still call it a bug. Before reporting the bug I had also noticed that removing any of the other tags resolved the problem; but that's irrelevant since in the reported case it is not working as expected.

Rich-Harris added a commit that referenced this issue Jun 25, 2019
prevent top-level text being discarded
@Rich-Harris
Copy link
Member

Fixed in 3.6.0. Thanks!

@gurjeet
Copy link
Author

gurjeet commented Jun 25, 2019

Fixed in 3.6.0. Thanks!

Confirmed the fix on repl (https://svelte.dev/repl/ac3e6448a4a04ed9a12e0ceed1d9dfae?version=3.6.0)

Thanks!

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

Successfully merging a pull request may close this issue.

5 participants