bugfix
Browse files- markdownGenerator.py +7 -4
markdownGenerator.py
CHANGED
|
@@ -19,10 +19,11 @@ def generate_markdown(state):
|
|
| 19 |
if 'participants' in state:
|
| 20 |
for key, participant in state['participants'].items():
|
| 21 |
if participant['name']:
|
|
|
|
| 22 |
html_str = html_str + f"""
|
| 23 |
<tr>
|
| 24 |
<td><strong>{participant['name']}</strong></td>
|
| 25 |
-
<td>{
|
| 26 |
"""
|
| 27 |
if 'type' in participant:
|
| 28 |
html_str = html_str + f"""<td>{participant['type'][0]}</td>"""
|
|
@@ -38,10 +39,11 @@ def generate_markdown(state):
|
|
| 38 |
</tr>"""
|
| 39 |
## If target Communities add it
|
| 40 |
if state['socialContext']['targetCommunity']['name']:
|
|
|
|
| 41 |
html_str = html_str + f"""
|
| 42 |
<tr>
|
| 43 |
<td><strong>{state['socialContext']['targetCommunity']['name']}</strong></td>
|
| 44 |
-
<td>{
|
| 45 |
<td> Targeted Community </td>
|
| 46 |
<td>{state['socialContext']['targetCommunity']['age'][0]}-{state['socialContext']['targetCommunity']['age'][1]}</td>
|
| 47 |
<td>{state['socialContext']['targetCommunity']['ethnicities']}</td>
|
|
@@ -54,10 +56,11 @@ def generate_markdown(state):
|
|
| 54 |
if 'bodies' in state['governance']:
|
| 55 |
for key, body in state['governance']["bodies"].items():
|
| 56 |
if body['name']:
|
|
|
|
| 57 |
html_str = html_str + f"""
|
| 58 |
<tr>
|
| 59 |
-
<td><strong>{body['name']
|
| 60 |
-
<td>{
|
| 61 |
if 'type' in body:
|
| 62 |
html_str = html_str + f"""<td>{body['type'][0]}</td>"""
|
| 63 |
else:
|
|
|
|
| 19 |
if 'participants' in state:
|
| 20 |
for key, participant in state['participants'].items():
|
| 21 |
if participant['name']:
|
| 22 |
+
description = participant['description'].replace('\\n', '')
|
| 23 |
html_str = html_str + f"""
|
| 24 |
<tr>
|
| 25 |
<td><strong>{participant['name']}</strong></td>
|
| 26 |
+
<td>{description}</td>
|
| 27 |
"""
|
| 28 |
if 'type' in participant:
|
| 29 |
html_str = html_str + f"""<td>{participant['type'][0]}</td>"""
|
|
|
|
| 39 |
</tr>"""
|
| 40 |
## If target Communities add it
|
| 41 |
if state['socialContext']['targetCommunity']['name']:
|
| 42 |
+
description = state['socialContext']['targetCommunity']['description'].replace('\\n', '')
|
| 43 |
html_str = html_str + f"""
|
| 44 |
<tr>
|
| 45 |
<td><strong>{state['socialContext']['targetCommunity']['name']}</strong></td>
|
| 46 |
+
<td>{description}</td>
|
| 47 |
<td> Targeted Community </td>
|
| 48 |
<td>{state['socialContext']['targetCommunity']['age'][0]}-{state['socialContext']['targetCommunity']['age'][1]}</td>
|
| 49 |
<td>{state['socialContext']['targetCommunity']['ethnicities']}</td>
|
|
|
|
| 56 |
if 'bodies' in state['governance']:
|
| 57 |
for key, body in state['governance']["bodies"].items():
|
| 58 |
if body['name']:
|
| 59 |
+
description = body['description'].replace('\\n', '')
|
| 60 |
html_str = html_str + f"""
|
| 61 |
<tr>
|
| 62 |
+
<td><strong>{body['name']}</strong></td>
|
| 63 |
+
<td>{description}</td>"""
|
| 64 |
if 'type' in body:
|
| 65 |
html_str = html_str + f"""<td>{body['type'][0]}</td>"""
|
| 66 |
else:
|