Skip to content

Commit

Permalink
Update docs/contributing/coding-standards/component-options.md
Browse files Browse the repository at this point in the history
Co-authored-by: Romaric Pascal <romaric.pascal@digital.cabinet-office.gov.uk>
  • Loading branch information
domoscargin and romaricpascal authored Nov 20, 2024
1 parent 2c5f100 commit b37a00c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/contributing/coding-standards/component-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ In our example, `rememberExpanded` becomes `data-remember-expanded`.

### In Nunjucks

Unlike the `data-*` attribute in HTML, there is no intrinsic link between the Nunjucks parameter name and the names used elsewhere. The Nunjucks parameter can therefore be named differently, if convenient.
Unlike the `data-*` attribute in HTML and the name of JavaScript configuration options, there is no intrinsic link between the Nunjucks parameter name and the names used elsewhere. The Nunjucks parameter can therefore be named differently, if convenient.

A common case is specifying whether a parameter accepts HTML or only plain text. For example, if a configuration option's value is inserted into the page using `innerText`, you might want to name the Nunjucks parameter something like `sectionLabelText` to indicate that HTML will not be parsed if provided.

Expand Down

0 comments on commit b37a00c

Please sign in to comment.