Skip to content

Commit c5d87ce

Browse files
krish2718jukkar
authored andcommitted
doc: extensions: Add support for space delimited shields
In case an entry takes multiple shileds delimited by space, handle that by moving to a list based parsing from string based parsing. Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
1 parent 651a723 commit c5d87ce

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/_extensions/table_from_rows.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@ def _find_shields(shields: Dict[str, Set[str]], sample_data: dict):
180180
if not extra_args_raw:
181181
return
182182

183-
if isinstance(extra_args_raw, list):
184-
extra_args = " ".join(extra_args_raw)
183+
if isinstance(extra_args_raw, str):
184+
extra_args = extra_args_raw.split()
185185
else:
186186
extra_args = extra_args_raw
187187

188-
shield_args = re.findall(r'SHIELD=(\S*)', extra_args)
188+
shield_args = [re.split(r'=', arg)[1] for arg in extra_args if 'SHIELD=' in arg]
189189
if not shield_args:
190190
return
191191

0 commit comments

Comments
 (0)