1
0
Fork 0

chore: More linting

@nicholasdower is smarter than me. What's missing was the
`listItemIndent` setting
This commit is contained in:
Joost De Cock 2022-02-20 14:44:38 +01:00
parent e6f1189017
commit 249f2600e5
293 changed files with 2170 additions and 2169 deletions

View file

@ -6,8 +6,8 @@ The `insertText` hook is called when text is about to be inserted during renderi
Methods attached to the `insertText` hook will receive 2 parameters:
- `locale` : The language code of the language requested by the user (defaults to `en`)
- `text`: The text to be inserted
- `locale` : The language code of the language requested by the user (defaults to `en`)
- `text`: The text to be inserted
Unlike most hooks that receive an object that you can make changes to,
for this hook you need to return a string.
@ -20,8 +20,8 @@ in [our i18n plugin](/reference/plugins/i18n/).
When we say that _this hook is called when text is about to be inserted_, that is a simplified view.
In reality, this hook is called:
- For every value set on data-text
- For the combined result of these values, joined together with spaces
- For every value set on data-text
- For the combined result of these values, joined together with spaces
Let's use an example to clarify things:
@ -33,9 +33,9 @@ points.example
For the example point above, the `insertText` hook will end up being called 3 times:
- First it will pass `seamAllowance` to the plugin
- Then it will pass `: 1cm` to the plugin
- Finally it will pass `seamAllowance : 1cm` to the plugin
- First it will pass `seamAllowance` to the plugin
- Then it will pass `: 1cm` to the plugin
- Finally it will pass `seamAllowance : 1cm` to the plugin
Having the `insertText` hook only run once with `Seam allowance: 1cm` would be problematic because
the seam allowance may differ, or perhaps we're using imperial units, and so on.