You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/contributing/writing-docs-guide.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -234,15 +234,13 @@ Using {term}`React` makes frontends fun again!
234
234
Using {term}`React` makes frontends fun again!
235
235
236
236
237
-
#### Toggle paragraph (Exercise solution / FAQ)
237
+
#### Nesting directives
238
238
239
-
Text snippets can be hidden with the option to show. Wrap it in an `admonition` and add the `class``toggle`.
239
+
You can [nest directives](https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#nesting-directives), such as [admonitions](https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#admonitions) and code blocks, by ensuring that the backtick-lines corresponding to the outermost directive are longer than the backtick-lines for the inner directives.
240
240
241
241
`````
242
-
````{admonition} f-strings can make your life easier
243
-
:class: toggle
244
-
245
-
To use formatted string literals, begin a string with `f` or `F` before the opening quotation mark or triple quotation mark.
242
+
````{tip}
243
+
To use formatted string literals ("f-strings"), begin a string with `f` or `F` before the opening quotation mark or triple quotation mark.
246
244
Inside this string, you can write a Python expression between `{` and `}` characters that can refer to variables or literal values.
247
245
248
246
```{code-block} python
@@ -256,14 +254,10 @@ print(f"my {a}nd line")
256
254
````
257
255
`````
258
256
259
-
You can [nest directives](https://myst-parser.readthedocs.io/en/latest/syntax/roles-and-directives.html#nesting-directives), such as admonitions and code blocks, by ensuring that the backtick-lines corresponding to the outermost directive are longer than the backtick-lines for the inner directives.
260
-
261
257
This would be rendered as:
262
258
263
-
````{admonition} f-strings can make your life easier
264
-
:class: toggle
265
-
266
-
To use formatted string literals, begin a string with `f` or `F` before the opening quotation mark or triple quotation mark.
259
+
````{tip}
260
+
To use formatted string literals ("f-strings"), begin a string with `f` or `F` before the opening quotation mark or triple quotation mark.
267
261
Inside this string, you can write a Python expression between `{` and `}` characters that can refer to variables or literal values.
0 commit comments