From c5d87cebe4df74ec470e9f0a776630d24e43afda Mon Sep 17 00:00:00 2001 From: Chaitanya Tata Date: Mon, 9 Dec 2024 17:31:07 +0530 Subject: [PATCH] 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 --- doc/_extensions/table_from_rows.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/_extensions/table_from_rows.py b/doc/_extensions/table_from_rows.py index 3f0d07a74a65..eb117805cea1 100644 --- a/doc/_extensions/table_from_rows.py +++ b/doc/_extensions/table_from_rows.py @@ -180,12 +180,12 @@ def _find_shields(shields: Dict[str, Set[str]], sample_data: dict): if not extra_args_raw: return - if isinstance(extra_args_raw, list): - extra_args = " ".join(extra_args_raw) + if isinstance(extra_args_raw, str): + extra_args = extra_args_raw.split() else: extra_args = extra_args_raw - shield_args = re.findall(r'SHIELD=(\S*)', extra_args) + shield_args = [re.split(r'=', arg)[1] for arg in extra_args if 'SHIELD=' in arg] if not shield_args: return