doc: fix: nullable 09*

This commit is contained in:
gwen 2026-05-13 15:02:35 +02:00
parent 81c40d6eb2
commit 250f63d8e1

View file

@ -122,7 +122,7 @@ Variables disabled when condition is null
But actually, why did we want a variable to be non-mandatory?
Well, what we want is we need to be able to disable either the `port` and the `version` in case of the `address` has no value set:
Well, what we want is we need to be able to :term:`disable <disabled>` either the `port` and the `version` in case of the `address` has no value set:
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_091/firefox/20-manual.yml
:language: yaml
@ -180,3 +180,17 @@ Well, what we want is we need to be able to disable either the `port` and the `v
when: null
...
For the `disabled` property to trigger, the condition `when: null` must appear,
pointing to the `_.address` variable, that is the `socks_proxy.address` variable.
.. keypoints:: Key points
We learned how to define a variable as having no value; it's possible with Rougail.
It's `default: null` and `mandatory: false`.
We also learned to continue using type redefinition, which we learned in the previous section.
And have continued to :term:`disable <disabled>` a variable depending this on
the presence or absence of a value.