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

Clarify the use of {@html ...} in the tutorial #993

Open
veeterAI opened this issue Dec 11, 2024 · 0 comments
Open

Clarify the use of {@html ...} in the tutorial #993

veeterAI opened this issue Dec 11, 2024 · 0 comments

Comments

@veeterAI
Copy link

The tutorial for HTML tags in Svelte uses three dots (...) as placeholders in the {@html ...} example. This can be confusing for readers, especially those familiar with ECMAScript, where ... has specific meaning (e.g., the spread/rest operator).

The dots are not part of the Svelte syntax or functionality; they simply indicate that a variable should be used there. However, this isn't explicitly stated, and it could mislead readers into thinking the ... is required syntax.

Suggested Fix:

Update the tutorial to replace the placeholder ... with a meaningful variable name (e.g., htmlContent) and clarify in the explanation that a variable containing the HTML string should be used.

Current Example:

<p>{@html ...}</p>

Suggested Example:

<p>{@html htmlContent}</p>

This will make the tutorial clearer and avoid potential misunderstandings.

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