Skip to content

Commit 350d4e0

Browse files
committed
minor #16120 Split a conditional doc include into two separate doc includes (javiereguiluz)
This PR was merged into the 4.4 branch. Discussion ---------- Split a conditional doc include into two separate doc includes Fixes #15988, #15976, #16081, #16095 and many other bug reports. We won't be able to add support for this in the RST parser soon ... and maybe we shouldn't, because this is a rarely used feature that can be solved in a different way, as shown in this PR. Commits ------- 3480f69 Split a conditional doc include into two separate doc includes
2 parents b043aa3 + 3480f69 commit 350d4e0

26 files changed

+52
-107
lines changed

reference/forms/types/choice.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,15 @@ compound
226226
This option specifies if a form is compound. The value is by default
227227
overridden by the value of the ``expanded`` option.
228228

229-
.. include:: /reference/forms/types/options/empty_data.rst.inc
230-
:end-before: DEFAULT_PLACEHOLDER
229+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
231230

232231
The actual default value of this option depends on other field options:
233232

234233
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
235234
(empty string);
236235
* Otherwise ``[]`` (empty array).
237236

238-
.. include:: /reference/forms/types/options/empty_data.rst.inc
239-
:start-after: DEFAULT_PLACEHOLDER
237+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
240238

241239
error_bubbling
242240
~~~~~~~~~~~~~~

reference/forms/types/collection.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,13 +384,11 @@ Not all options are listed here - only the most applicable to this type:
384384

385385
.. include:: /reference/forms/types/options/by_reference.rst.inc
386386

387-
.. include:: /reference/forms/types/options/empty_data.rst.inc
388-
:end-before: DEFAULT_PLACEHOLDER
387+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
389388

390389
The default value is ``[]`` (empty array).
391390

392-
.. include:: /reference/forms/types/options/empty_data.rst.inc
393-
:start-after: DEFAULT_PLACEHOLDER
391+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
394392

395393
error_bubbling
396394
~~~~~~~~~~~~~~

reference/forms/types/color.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
3535

3636
.. include:: /reference/forms/types/options/disabled.rst.inc
3737

38-
.. include:: /reference/forms/types/options/empty_data.rst.inc
39-
:end-before: DEFAULT_PLACEHOLDER
38+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
4039

4140
The default value is ``''`` (the empty string).
4241

43-
.. include:: /reference/forms/types/options/empty_data.rst.inc
44-
:start-after: DEFAULT_PLACEHOLDER
42+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
4543

4644
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
4745

reference/forms/types/country.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,15 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
9191

9292
.. include:: /reference/forms/types/options/disabled.rst.inc
9393

94-
.. include:: /reference/forms/types/options/empty_data.rst.inc
95-
:end-before: DEFAULT_PLACEHOLDER
94+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
9695

9796
The actual default value of this option depends on other field options:
9897

9998
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
10099
(empty string);
101100
* Otherwise ``[]`` (empty array).
102101

103-
.. include:: /reference/forms/types/options/empty_data.rst.inc
104-
:start-after: DEFAULT_PLACEHOLDER
102+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
105103

106104
.. include:: /reference/forms/types/options/help.rst.inc
107105

reference/forms/types/currency.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,15 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
6868

6969
.. include:: /reference/forms/types/options/disabled.rst.inc
7070

71-
.. include:: /reference/forms/types/options/empty_data.rst.inc
72-
:end-before: DEFAULT_PLACEHOLDER
71+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
7372

7473
The actual default value of this option depends on other field options:
7574

7675
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
7776
(empty string);
7877
* Otherwise ``[]`` (empty array).
7978

80-
.. include:: /reference/forms/types/options/empty_data.rst.inc
81-
:start-after: DEFAULT_PLACEHOLDER
79+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
8280

8381
.. include:: /reference/forms/types/options/help.rst.inc
8482

reference/forms/types/email.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
2828

2929
.. include:: /reference/forms/types/options/disabled.rst.inc
3030

31-
.. include:: /reference/forms/types/options/empty_data.rst.inc
32-
:end-before: DEFAULT_PLACEHOLDER
31+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
3332

3433
The default value is ``''`` (the empty string).
3534

36-
.. include:: /reference/forms/types/options/empty_data.rst.inc
37-
:start-after: DEFAULT_PLACEHOLDER
35+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
3836

3937
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
4038

reference/forms/types/entity.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,17 +288,15 @@ type:
288288

289289
.. include:: /reference/forms/types/options/disabled.rst.inc
290290

291-
.. include:: /reference/forms/types/options/empty_data.rst.inc
292-
:end-before: DEFAULT_PLACEHOLDER
291+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
293292

294293
The actual default value of this option depends on other field options:
295294

296295
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
297296
(empty string);
298297
* Otherwise ``[]`` (empty array).
299298

300-
.. include:: /reference/forms/types/options/empty_data.rst.inc
301-
:start-after: DEFAULT_PLACEHOLDER
299+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
302300

303301
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
304302

reference/forms/types/form.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ option on the form.
4949

5050
.. _reference-form-option-empty-data:
5151

52-
.. include:: /reference/forms/types/options/empty_data.rst.inc
53-
:end-before: DEFAULT_PLACEHOLDER
52+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
5453

5554
The actual default value of this option depends on other field options:
5655

@@ -61,8 +60,7 @@ The actual default value of this option depends on other field options:
6160
* If ``data_class`` is not set and ``compound`` is ``false``, then ``''``
6261
(empty string).
6362

64-
.. include:: /reference/forms/types/options/empty_data.rst.inc
65-
:start-after: DEFAULT_PLACEHOLDER
63+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
6664

6765
.. _reference-form-option-error-bubbling:
6866

reference/forms/types/hidden.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
4444

4545
.. include:: /reference/forms/types/options/data.rst.inc
4646

47-
.. include:: /reference/forms/types/options/empty_data.rst.inc
48-
:end-before: DEFAULT_PLACEHOLDER
47+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
4948

5049
The default value is ``''`` (the empty string).
5150

52-
.. include:: /reference/forms/types/options/empty_data.rst.inc
53-
:start-after: DEFAULT_PLACEHOLDER
51+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
5452

5553
.. include:: /reference/forms/types/options/error_mapping.rst.inc
5654

reference/forms/types/integer.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,11 @@ These options inherit from the :doc:`FormType </reference/forms/types/form>`:
8888

8989
.. include:: /reference/forms/types/options/disabled.rst.inc
9090

91-
.. include:: /reference/forms/types/options/empty_data.rst.inc
92-
:end-before: DEFAULT_PLACEHOLDER
91+
.. include:: /reference/forms/types/options/empty_data_declaration.rst.inc
9392

9493
The default value is ``''`` (the empty string).
9594

96-
.. include:: /reference/forms/types/options/empty_data.rst.inc
97-
:start-after: DEFAULT_PLACEHOLDER
95+
.. include:: /reference/forms/types/options/empty_data_description.rst.inc
9896

9997
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
10098

0 commit comments

Comments
 (0)