Skip to content

Syntax Compatibility #73

Description

@DrSensor

Templating

✅ HTML
✅ XHTML
❌ JSX (JavaScript)
❌ templ (Go) 1
❔ Laravel Blade (PHP)
✅ Django (Python)
✅ ERB (Ruby)
html/template (Hugo|Go) 2
❌ WebC (11ty|JavaScript)
✅ Tera (Zola|Rust)
✅ Eta / EJS (JavaScript)
✅ Liquid
✅ Jinja / Nunjucks / ...
✅ Svelte (JavaScript)
❌ Vue (JavaScript)
❔ Astro (JavaScript)
❔ Angular (JavaScript)

Processor

✅ Lambda Soup (Soupault|OCaml)
❔ parse5 (JavaScript)
✅ lxml (Python)
❔ lol-html (Rust, HTMLRewriter|JavaScript)

Workaround

  • Vue: namespace mode
  • JSX: namespace mode
  • WebC: prefix mode? 🤔
  • Laravel Blade: most likely work on native mode 🤔
  • html/template: most likely work on native mode but it's best to use namespace mode [^1]

Footnotes

  1. Currently templ only support attr with prefix @ _ : a-z (source). Looking at their git history, seems they open for changes 🤔

  2. Go standard html templating sanitize attribute value except attribute name with namespace or data- prefix. The sanitizer may break the micro-syntax. For example, .value="prop.count~>my.count" may transform into .value="prop.count~>my.count" 🤔

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    meta threadSpec and Draft but in several comments. Mostly this kind of issue are locked to keep it clean.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions