mirror of
https://github.com/clearlinux/autospec.git
synced 2026-08-21 06:26:18 +00:00
Fix R description parsing for last field in the file
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
@@ -314,8 +314,10 @@ def _get_desc_field(field, desc):
|
||||
create the list.
|
||||
"""
|
||||
val = []
|
||||
# Values may span multiple lines...
|
||||
pat = re.compile(r"^" + field + r":(.*?)(?=\n\S+:)", re.MULTILINE | re.DOTALL)
|
||||
# Note that fields may appear on any line, and values may span multiple
|
||||
# lines. The end of the match is captured by either a lookahead assertion
|
||||
# for the "next" field in the file, or \Z, which matches EOF in this case.
|
||||
pat = re.compile(r"^" + field + r":(.*?)((?=\n\S+:)|\Z)", re.MULTILINE | re.DOTALL)
|
||||
match = pat.search(desc)
|
||||
if match:
|
||||
joined = match.group(1).replace("\n", " ").strip(' ,')
|
||||
|
||||
Reference in New Issue
Block a user