File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ def run(self):
4747 classes = 'ui top attached tabular menu sphinx-menu'
4848 tabs_node ['classes' ] = classes .split (' ' )
4949
50+ env .temp_data ['tab_ids' ] = []
5051 env .temp_data ['tab_titles' ] = []
5152 env .temp_data ['is_first_tab' ] = True
5253 self .state .nested_parse (self .content , self .content_offset , node )
@@ -89,6 +90,11 @@ def run(self):
8990
9091 if 'tab_id' not in args :
9192 args ['tab_id' ] = env .new_serialno ('tab_id' )
93+ i = 1
94+ while args ['tab_id' ] in env .temp_data ['tab_ids' ]:
95+ args ['tab_id' ] = '%s-%d' % (args ['tab_id' ], i )
96+ i += 1
97+ env .temp_data ['tab_ids' ].append (args ['tab_id' ])
9298
9399 data_tab = "sphinx-data-tab-{}" .format (args ['tab_id' ])
94100
Original file line number Diff line number Diff line change @@ -93,6 +93,34 @@ Code Tabs
9393 PROGRAM main
9494 END PROGRAM main
9595
96+ .. tabs ::
97+
98+ .. code-tab :: json 400
99+
100+ {
101+ "message": "Possible issue 1"
102+ }
103+
104+ .. code-tab :: json 400
105+
106+ {
107+ "message": "Possible issue 2"
108+ }
109+
110+ .. tabs ::
111+
112+ .. code-tab :: json 400
113+
114+ {
115+ "message": "Possible issue 1"
116+ }
117+
118+ .. code-tab :: json 400
119+
120+ {
121+ "message": "Possible issue 2"
122+ }
123+
96124Group Tabs
97125========================================
98126
You can’t perform that action at this time.
0 commit comments