From fba2fb6e006917471b62fc2c8bf76277a4fbe71d Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Apr 23 2020 16:16:42 +0000 Subject: Fix non-link-text testname parsing when it has spaces in it When the "test name" (the part of the test case column value that is not the testcase link itself, if there is one) is not a link text (i.e. not `[[QA:Testcase_foo|testname blah]]`, but something like `[[QA:Testcase_foo]] - testname blah`), we cut it off at the first whitespace character. So in the above example the test name just came out as "-". This was making it impossible to handle the newly-tweaked Desktop matrix, and it actually affects several rows elsewhere too, I just hadn't noticed. This should fix it cleanly; I haven't checked it on historical pages but I did check it on all current pages and the values all look correct to my eyes. Signed-off-by: Adam Williamson --- diff --git a/wikitcms/result.py b/wikitcms/result.py index a8f91f3..051586e 100644 --- a/wikitcms/result.py +++ b/wikitcms/result.py @@ -518,7 +518,7 @@ class ResultRow(TestInstance): continue except IndexError: try: - altname = cell.strip().strip('[]').split()[1] + altname = cell.strip().strip('[]').split(maxsplit=1)[1] except IndexError: altname = None if '{{result' in cell or '{{testresult' in cell: