Adding handling for incorrect field markup
Former-commit-id: 1f496162e8fc779cb4950d4f3c179e4d6d52aa61
This commit is contained in:
parent
b6d80360d7
commit
9461c0f3dc
@ -83,7 +83,10 @@ def findSentence(content, position):
|
|||||||
def formatFields(fields, markup):
|
def formatFields(fields, markup):
|
||||||
result = dict()
|
result = dict()
|
||||||
for field, value in fields.items():
|
for field, value in fields.items():
|
||||||
|
try:
|
||||||
result[field] = value.format(**markup)
|
result[field] = value.format(**markup)
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user