Body checks
This commit is contained in:
parent
6c3382f2ae
commit
56e143625d
|
@ -78,6 +78,14 @@ export function validateHbsTemplate(
|
||||||
message: `Helper "${helperName}" requires a body:\n{{#${helperName} ...}} [body] {{/${helperName}}}`,
|
message: `Helper "${helperName}" requires a body:\n{{#${helperName} ...}} [body] {{/${helperName}}}`,
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
} else if (!requiresBlock && isBlockStatement(node)) {
|
||||||
|
diagnostics.push({
|
||||||
|
from,
|
||||||
|
to,
|
||||||
|
severity: "error",
|
||||||
|
message: `Helper "${helperName}" should not contain a body.`,
|
||||||
|
})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let providedParamsCount = node.params.length
|
let providedParamsCount = node.params.length
|
||||||
|
|
Loading…
Reference in New Issue