E003

Error

Syntax and structure

E003 — Indentation that lines up with no block

In a .wfx file a line opens a block by being followed by a deeper one, and closes blocks by coming back out. A line that comes back to an indentation no enclosing block has is ambiguous.

What the compiler said

error[E003]: This line's indentation matches no block around it --> src/App.wfx:4:7 | 4 | Text("b") | ^^^^ = help: Indent it to the block it belongs to, with the same spaces or tabs as the lines around it = docs: https://webfluent.monzeromer.dev/errors/E003

The fix

Broken

wfx

page Home(path: "/") Row Text("a") Text("b")

Fixed

wfx

page Home(path: "/", title: "Home", description: "Two words in a row.") Heading("Home").h1 Row Text("a") Text("b")

Line the line up with the block it belongs to.

Each example is a whole program: it is all of src/App.wf in a project with no other .wf file (trying an example).

Why this rule exists

In a .wfx file, a line that comes back out to an indentation no enclosing block has. Saved as src/App.wfx, this draws E003:

lints cannot lower it: it would ship a broken page.