From 797bd5720a5e573edcbd0e2cc19607ee4fdb1a2e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 16 May 2021 11:59:32 +0100 Subject: [PATCH] Formatting of list of skills --- webapp_utils.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/webapp_utils.py b/webapp_utils.py index b4d075108..fd6a08d9d 100644 --- a/webapp_utils.py +++ b/webapp_utils.py @@ -728,11 +728,17 @@ def htmlHeaderWithPersonMarkup(cssFilename: str, instanceTitle: str, occupationStr += ' "name": "' + occupationName + '",\n' skillsList = actorJson['hasOccupation']['skills'] if skillsList: + skillsListStr = '[' + for skillStr in skillsList: + if skillsListStr != '[': + skillsListStr += ', ' + skillsListStr += '"' + skillStr + '"' + skillsListStr += ']' skillsMarkup = \ ' "hasOccupation": {\n' + \ ' "@type": "Occupation",\n' + \ occupationStr + \ - ' "skills": ' + str(skillsList) + '\n' + \ + ' "skills": ' + skillsListStr + '\n' + \ ' "},\n' cityMarkup = '' if city: