Skip to content

Commit 02204d0

Browse files
committed
Clean up writing-docs-guide.md
- Remove toggle per plone#1260 (comment). This also simplifies the nested directive example. -
1 parent 88bb73c commit 02204d0

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

docs/contributing/writing-docs-guide.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,13 @@ Using {term}`React` makes frontends fun again!
234234
Using {term}`React` makes frontends fun again!
235235

236236

237-
#### Toggle paragraph (Exercise solution / FAQ)
237+
#### Nesting directives
238238

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.
240240

241241
`````
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.
246244
Inside this string, you can write a Python expression between `{` and `}` characters that can refer to variables or literal values.
247245
248246
```{code-block} python
@@ -256,14 +254,10 @@ print(f"my {a}nd line")
256254
````
257255
`````
258256

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-
261257
This would be rendered as:
262258

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.
267261
Inside this string, you can write a Python expression between `{` and `}` characters that can refer to variables or literal values.
268262
269263
```{code-block} python

0 commit comments

Comments
 (0)