Skip to content

Commit 99b1f81

Browse files
committed
updated dcos
1 parent 913d587 commit 99b1f81

2 files changed

Lines changed: 40 additions & 18 deletions

File tree

docs/source/components/directive.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
Directive
44
=========
55

6-
``CodeLinks`` provides the ``src-trace`` directive and it can be used in the following ways:
6+
.. attention:: ``src-trace`` directive currently only supports :ref:`one-line need definition <oneline>`.
7+
8+
``CodeLinks`` provides ``src-trace`` directive and it can be used in the following ways:
79

810
.. code-block:: rst
911

docs/source/components/oneline.rst

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,25 @@ For example, with the following **needs_fields** configuration:
9191

9292
.. _`fields_config`:
9393

94-
.. code-block:: python
94+
.. tabs::
95+
96+
.. code-tab:: python
97+
98+
needs_fields = [
99+
{"name": "title"},
100+
{"name": "id"},
101+
{"name": "type", "default": "impl"},
102+
{"name": "links", "type": "list[str]", "default": []},
103+
],
104+
105+
.. code-tab:: toml
95106

96-
needs_fields=[
97-
{"name": "title"},
98-
{"name": "id"},
99-
{"name": "type", "default": "impl"},
100-
{"name": "links", "type": "list[str]", "default": []},
101-
],
107+
needs_fields = [
108+
{ name = "title" },
109+
{ name = "id" },
110+
{ name = "type", default = "impl" },
111+
{ name = "links", type = "list[str]", default = [] },
112+
]
102113

103114
the one-line comment shall be defined as follows:
104115

@@ -122,17 +133,26 @@ when it is not given in the need definition.
122133

123134
For example, with the following needs_fields definition,
124135

125-
.. code-block:: python
136+
.. tabs::
137+
138+
.. code-tab:: python
139+
140+
needs_fields = [
141+
{
142+
"name": "title"
143+
},
144+
{
145+
"name": "type",
146+
"default": "implementation"
147+
},
148+
]
149+
150+
.. code-tab:: toml
126151

127-
needs_fields = [
128-
{
129-
"name": "title"
130-
},
131-
{
132-
"name": "type",
133-
"default": "implementation"
134-
},
135-
]
152+
needs_fields = [
153+
{ name = "title" },
154+
{ name = "type", default = "implementation" }
155+
]
136156

137157
the following need definition in source code is equivalent to RST shown below:
138158

0 commit comments

Comments
 (0)