Skip to content

Commit 890ae5d

Browse files
gjchong25Grace Chong
andauthored
DOP-2742: Restore examples for io-code-block, input, and output directives in rstspec.toml (#387)
* DOP-2742: Restore examples for io-code-block, input, and output directives in rstspec.toml * alter snippets to make more sense * fix snippet Co-authored-by: Grace Chong <[email protected]>
1 parent ba8d2cd commit 890ae5d

File tree

1 file changed

+28
-21
lines changed

1 file changed

+28
-21
lines changed

snooty/rstspec.toml

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -471,14 +471,23 @@ options.caption = "string"
471471
options.copyable = "boolean"
472472
options.class = "string"
473473
options.source = "uri"
474-
# example = """.. io-code-block::
475-
# ${2::copyable: (bool)
476-
# :caption: (string)
477-
# :class: (string)}
478-
# :source: ${1: URL to source code}
479-
480-
# ${0:code input/code output content}
481-
# """
474+
example = """.. io-code-block::
475+
${2::copyable: (bool)
476+
:caption: (string)
477+
:class: (string)
478+
:source: ${1: URL to source code}}
479+
480+
.. input:: ${0:code input or </path/to/file>}
481+
:language: ${1:language}
482+
:emphasize-lines: (string)
483+
:linenos: (flag)
484+
485+
.. output:: ${0:code output or </path/to/file>}
486+
:language: ${1:language}
487+
:emphasize-lines: (string)
488+
:linenos: (flag)
489+
:visible: (bool)
490+
"""
482491

483492
[directive.input]
484493
help = """The code content."""
@@ -487,12 +496,11 @@ content_type = "raw"
487496
options.language = "string"
488497
options.emphasize-lines = "linenos"
489498
options.linenos = "flag"
490-
# example = """.. io-code-block::
491-
# .. input:: ${0:code output or </path/to/file>}
492-
# :language: ${1:language}
493-
# :emphasize-lines: (string)
494-
# :linenos: (flag)
495-
# """
499+
example = """.. input:: ${0:code input or </path/to/file>}
500+
:language: ${1:language}
501+
:emphasize-lines: (string)
502+
:linenos: (flag)
503+
"""
496504

497505
[directive.output]
498506
help = """The code output."""
@@ -502,13 +510,12 @@ options.language = "string"
502510
options.emphasize-lines = "linenos"
503511
options.linenos = "flag"
504512
options.visible = "boolean"
505-
# example = """.. io-code-block::
506-
# .. output:: ${0:code output or </path/to/file>}
507-
# :language: ${1:language}
508-
# :emphasize-lines: (string)
509-
# :linenos: (flag)
510-
# :visible: (bool)
511-
# """
513+
example = """.. output:: ${0:code output or </path/to/file>}
514+
:language: ${1:language}
515+
:emphasize-lines: (string)
516+
:linenos: (flag)
517+
:visible: (bool)
518+
"""
512519

513520
[directive.cssclass]
514521
help = """Add the given CSS class name to generated HTML of the contained (if content is given) or

0 commit comments

Comments
 (0)