66
77When building a console application it may be useful to display tabular data:
88
9- .. code-block :: text
9+ .. code-block :: terminal
1010
1111 +---------------+--------------------------+------------------+
1212 | ISBN | Title | Author |
@@ -54,7 +54,7 @@ You can add a table separator anywhere in the output by passing an instance of
5454 array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'),
5555 ));
5656
57- .. code-block :: text
57+ .. code-block :: terminal
5858
5959 +---------------+--------------------------+------------------+
6060 | ISBN | Title | Author |
@@ -78,7 +78,7 @@ In this example, the first column width will be ``10``, the last column width
7878will be ``30 `` and the second column width will be calculated automatically
7979because of the ``0 `` value. The output of this command will be:
8080
81- .. code-block :: text
81+ .. code-block :: terminal
8282
8383 +---------------+--------------------------+--------------------------------+
8484 | ISBN | Title | Author |
@@ -117,7 +117,7 @@ The table style can be changed to any built-in styles via
117117
118118This code results in:
119119
120- .. code-block :: text
120+ .. code-block :: terminal
121121
122122 ISBN Title Author
123123 99921-58-10-7 Divine Comedy Dante Alighieri
@@ -132,7 +132,7 @@ You can also set the style to ``borderless``::
132132
133133which outputs:
134134
135- .. code-block :: text
135+ .. code-block :: terminal
136136
137137 =============== ========================== ==================
138138 ISBN Title Author
@@ -205,7 +205,7 @@ To make a table cell that spans multiple columns you can use a :class:`Symfony\\
205205
206206This results in:
207207
208- .. code-block :: text
208+ .. code-block :: terminal
209209
210210 +---------------+---------------+-----------------+
211211 | ISBN | Title | Author |
@@ -228,7 +228,7 @@ This results in:
228228
229229 This generates:
230230
231- .. code-block :: text
231+ .. code-block :: terminal
232232
233233 +-------+-------+--------+
234234 | Main table title |
@@ -259,7 +259,7 @@ In a similar way you can span multiple rows::
259259
260260This outputs:
261261
262- .. code-block :: text
262+ .. code-block :: terminal
263263
264264 +----------------+---------------+---------------------+
265265 | ISBN | Title | Author |
0 commit comments