|
56 | 56 | "cell_type": "markdown", |
57 | 57 | "metadata": {}, |
58 | 58 | "source": [ |
59 | | - "### 📓 `#|hide` \n", |
| 59 | + "### 📓 `#| hide` \n", |
60 | 60 | "\n", |
61 | 61 | "Hide cell input and output. " |
62 | 62 | ] |
|
76 | 76 | "print('you will not see this')\n", |
77 | 77 | "```\n", |
78 | 78 | "\n", |
79 | | - "Note that using `#|hide` is equivalent to using the Quarto directive `#|include: false`:\n", |
| 79 | + "Note that using `#| hide` is equivalent to using the Quarto directive `#| include: false`:\n", |
80 | 80 | "\n", |
81 | 81 | "```python\n", |
82 | 82 | "#| include: false\n", |
83 | 83 | "print('you will not see this')\n", |
84 | 84 | "```\n", |
85 | 85 | "\n", |
86 | | - "See the quarto docs for more information about `#|include`.\n", |
| 86 | + "See the quarto docs for more information about `#| include`.\n", |
87 | 87 | "\n", |
88 | 88 | ":::" |
89 | 89 | ] |
|
92 | 92 | "cell_type": "markdown", |
93 | 93 | "metadata": {}, |
94 | 94 | "source": [ |
95 | | - "### 🔵 `#|echo: <true|false>`\n", |
| 95 | + "### 🔵 `#| echo: <true|false>`\n", |
96 | 96 | "\n", |
97 | 97 | "Toggle the visibility of code-cell inputs.\n", |
98 | 98 | "\n", |
|
120 | 120 | "cell_type": "markdown", |
121 | 121 | "metadata": {}, |
122 | 122 | "source": [ |
123 | | - "### 🔵 `#|output: <true|false|asis>`\n", |
| 123 | + "### 🔵 `#| output: <true|false|asis>`\n", |
124 | 124 | "\n", |
125 | 125 | "Setting this to `false` hides the output of a cell. Setting this to `asis` renders the output as raw markdown.\n", |
126 | 126 | "\n", |
|
135 | 135 | "1 + 1\n", |
136 | 136 | "```\n", |
137 | 137 | " \n", |
138 | | - "The following cell with `#|output: asis` will produce the output `hello fastai` rendered as markdown instead of a string: \n", |
| 138 | + "The following cell with `#| output: asis` will produce the output `hello fastai` rendered as markdown instead of a string: \n", |
139 | 139 | " \n", |
140 | 140 | "```python \n", |
141 | 141 | "#| output: asis\n", |
|
148 | 148 | "cell_type": "markdown", |
149 | 149 | "metadata": {}, |
150 | 150 | "source": [ |
151 | | - "### 📓 `#|hide_line`\n", |
| 151 | + "### 📓 `#| hide_line`\n", |
152 | 152 | "\n", |
153 | 153 | "Hide a specific line of code in an input cell. \n", |
154 | 154 | "\n", |
|
160 | 160 | "def _secret(): ...\n", |
161 | 161 | "\n", |
162 | 162 | "for i in range(3):\n", |
163 | | - " _secret() #|hide_line\n", |
| 163 | + " _secret() #| hide_line\n", |
164 | 164 | " print(i)\n", |
165 | 165 | "```\n", |
166 | 166 | "\n", |
|
186 | 186 | "def _secret(): ...\n", |
187 | 187 | "\n", |
188 | 188 | "for i in range(3):\n", |
189 | | - " _secret() #|hide_line\n", |
| 189 | + " _secret() #| hide_line\n", |
190 | 190 | " print(i)" |
191 | 191 | ] |
192 | 192 | }, |
|
201 | 201 | "cell_type": "markdown", |
202 | 202 | "metadata": {}, |
203 | 203 | "source": [ |
204 | | - "### 📓 `#|filter_stream <keyword> ...`\n", |
| 204 | + "### 📓 `#| filter_stream <keyword> ...`\n", |
205 | 205 | "\n", |
206 | 206 | "Filter lines containing specific keywords in cell outputs. \n", |
207 | 207 | "\n", |
|
253 | 253 | "cell_type": "markdown", |
254 | 254 | "metadata": {}, |
255 | 255 | "source": [ |
256 | | - "### 🔵 `#|code-fold: <show|true>`" |
| 256 | + "### 🔵 `#| code-fold: <show|true>`" |
257 | 257 | ] |
258 | 258 | }, |
259 | 259 | { |
260 | 260 | "cell_type": "markdown", |
261 | 261 | "metadata": {}, |
262 | 262 | "source": [ |
263 | | - "The `#|code-fold` directive allows you to collapse code cells. When set to `true`, the element is collapsed by default, when set to show `show` the element is shown by default.\n", |
| 263 | + "The `#| code-fold` directive allows you to collapse code cells. When set to `true`, the element is collapsed by default, when set to show `show` the element is shown by default.\n", |
264 | 264 | "\n", |
265 | 265 | "::: {.callout-note collapse=\"true\"}\n", |
266 | 266 | "\n", |
267 | 267 | "##### Example\n", |
268 | 268 | "\n", |
269 | | - "When you set `#|code-fold: true`, the input cell is collapsed:" |
| 269 | + "When you set `#| code-fold: true`, the input cell is collapsed:" |
270 | 270 | ] |
271 | 271 | }, |
272 | 272 | { |
|
298 | 298 | "cell_type": "markdown", |
299 | 299 | "metadata": {}, |
300 | 300 | "source": [ |
301 | | - "When you set `#|code-fold: show` the input cell is shown but still in a collapsible element:" |
| 301 | + "When you set `#| code-fold: show` the input cell is shown but still in a collapsible element:" |
302 | 302 | ] |
303 | 303 | }, |
304 | 304 | { |
|
346 | 346 | "cell_type": "markdown", |
347 | 347 | "metadata": {}, |
348 | 348 | "source": [ |
349 | | - "### 📓 `#|default_exp <name>`" |
| 349 | + "### 📓 `#| default_exp <name>`" |
350 | 350 | ] |
351 | 351 | }, |
352 | 352 | { |
353 | 353 | "cell_type": "markdown", |
354 | 354 | "metadata": {}, |
355 | 355 | "source": [ |
356 | | - "Names the module where cells with the `#|export` directive will be exported to by default.\n", |
| 356 | + "Names the module where cells with the `#| export` directive will be exported to by default.\n", |
357 | 357 | "\n", |
358 | 358 | "::: {.callout-note collapse=\"true\"}\n", |
359 | 359 | "\n", |
|
383 | 383 | "cell_type": "markdown", |
384 | 384 | "metadata": {}, |
385 | 385 | "source": [ |
386 | | - "### 📓 `#|export`" |
| 386 | + "### 📓 `#| export`" |
387 | 387 | ] |
388 | 388 | }, |
389 | 389 | { |
|
404 | 404 | " return f'Hello {to}!'\n", |
405 | 405 | "```\n", |
406 | 406 | "\n", |
407 | | - "The above cell will get exported to the module specified by `#|default_exp`. These exports are automatically included in [`__all__`](https://docs.python.org/3/tutorial/modules.html#importing-from-a-package) for the module. To learn how export without inclusion in `__all__`, see the `#|exporti` directive.\n", |
| 407 | + "The above cell will get exported to the module specified by `#| default_exp`. These exports are automatically included in [`__all__`](https://docs.python.org/3/tutorial/modules.html#importing-from-a-package) for the module. To learn how export without inclusion in `__all__`, see the `# |exporti` directive.\n", |
408 | 408 | "\n", |
409 | 409 | "Furthermore, the documentation for this function will automatically be rendered like this:" |
410 | 410 | ] |
|
464 | 464 | ], |
465 | 465 | "source": [ |
466 | 466 | "#| echo: false\n", |
467 | | - "# Note: we are using show_doc like this to simulate the effect of #|export without using export\n", |
| 467 | + "# Note: we are using show_doc like this to simulate the effect of #| export without using export\n", |
468 | 468 | "show_doc(say_hello)" |
469 | 469 | ] |
470 | 470 | }, |
|
486 | 486 | "cell_type": "markdown", |
487 | 487 | "metadata": {}, |
488 | 488 | "source": [ |
489 | | - "### 📓 `#|exporti`" |
| 489 | + "### 📓 `#| exporti`" |
490 | 490 | ] |
491 | 491 | }, |
492 | 492 | { |
|
502 | 502 | "cell_type": "markdown", |
503 | 503 | "metadata": {}, |
504 | 504 | "source": [ |
505 | | - "### 📓 `#|exports`" |
| 505 | + "### 📓 `#| exports`" |
506 | 506 | ] |
507 | 507 | }, |
508 | 508 | { |
509 | 509 | "cell_type": "markdown", |
510 | 510 | "metadata": {}, |
511 | 511 | "source": [ |
512 | | - "A `s`ource export. Like `#|export` but in addition to showing docs via `showdoc.show_doc`, it also shows the source code.\n", |
| 512 | + "A `s`ource export. Like `#| export` but in addition to showing docs via `showdoc.show_doc`, it also shows the source code.\n", |
513 | 513 | "\n", |
514 | 514 | "\n", |
515 | 515 | "::: {.callout-note collapse=\"true\"}\n", |
|
595 | 595 | "cell_type": "markdown", |
596 | 596 | "metadata": {}, |
597 | 597 | "source": [ |
598 | | - "### 📓 `#|exec_doc`" |
| 598 | + "### 📓 `#| exec_doc`" |
599 | 599 | ] |
600 | 600 | }, |
601 | 601 | { |
|
684 | 684 | "cell_type": "markdown", |
685 | 685 | "metadata": {}, |
686 | 686 | "source": [ |
687 | | - "### 🔵 `#|eval: <true|false>`" |
| 687 | + "### 🔵 `#| eval: <true|false>`" |
688 | 688 | ] |
689 | 689 | }, |
690 | 690 | { |
|
0 commit comments