- # if there are no commas then it is the single option
- # and the options line should be removed since it will be empty
- if comma_before_pos == comma_after_pos == -1:
- del document.header[options_line]
- return
-
- # last option
- options = document.header[options_line]
- if comma_after_pos == -1:
- document.header[options_line] = options[:comma_before_pos].rsplit()
- return
-
- document.header[options_line] = options[comma_before_pos: comma_after_pos]