A zero-scaling multi-paradigm UI component framework in Rust.
Asteracea book src static_components html_comments.md
603 B
Markdown
at dev

HTML comments #

The third kind of comment is specific to Asteracea and does affect program output:

asteracea::component! {
  HtmlCommented()()

  <!-- "This is an HTML comment." -->
}

The double quotes are a Rust limitation: Since Rust tokenises macro input, a string literal is required to extract raw text.

You can use a multiline string to easily write a multiline HTML comment:

asteracea::component! {
  HtmlCommented()()

  <!-- "
    This comment spans mul-
    tiple lines, I hope it is
    not too annoying.
  " -->
}