diff options
Diffstat (limited to 'src/control.sh')
-rw-r--r-- | src/control.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/control.sh b/src/control.sh index bb0c0e6..30e594e 100644 --- a/src/control.sh +++ b/src/control.sh @@ -79,16 +79,23 @@ parse_control() if ! "${paragraph_cb}"; then return 0 fi - if [ -n "${para_req_fields}" ]; then + case "${para_req_fields}" in *[!\ ]*) + # Missing required control + # fields. + sep="$(get_msg \ + 'list_item_separator')" para_req_fields="$(printf \ - "%s$(get_msg \ - 'list_item_separator')"\ - ${para_req_fields})" + "%s${sep}" \ + ${para_req_fields}; \ + printf 'x')" + para_req_fields="$(: \ + )${para_req_fields%$(: \ + )${sep}x}" _parse_control_error \ "${file}" "${line_nr}" \ 'control_missing_fields'\ "${para_req_fields}" - fi + esac fi para_req_fields="${req_fields}" got_fields=' ' |