You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Astro components are not POSIX compliant because if you add a new empty line at the end of the file, it gets converted to a space.
This code (Foo.astro):
<>foo</>(\n, new line)
(EOF, empty line)
If you call it like <p><Foo /></p>, the result is <p>foo </p> (with an ending space that affects the html render).
POSIX define a line as:
3.206 Line
A sequence of zero or more non- <newline> characters plus a terminating character.
So astro components should let you finish the file with an empty new line. Astro maybe needs to call trim() internally so it gets deleted and not converted into a space.
What version of
astro
are you using?v1.0.0-beta.40
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Linux
Describe the Bug
Astro components are not POSIX compliant because if you add a new empty line at the end of the file, it gets converted to a space.
This code (Foo.astro):
If you call it like
<p><Foo /></p>
, the result is<p>foo </p>
(with an ending space that affects the html render).POSIX define a line as:
So astro components should let you finish the file with an empty new line. Astro maybe needs to call
trim()
internally so it gets deleted and not converted into a space.Link to Minimal Reproducible Example
https://codesandbox.io/s/withered-breeze-9t904k?file=/src/pages/index.astro
Participation
The text was updated successfully, but these errors were encountered: