-- | A key–value pair
option :: Parser (Key, ConfigOption)
option = mk <$> blanks <*> key <*> blanks <*> separator <*> blanks <*> takeLine
  where
    key = takeWhile1 keyClass
    separator = string "=" <|> string ":"

    mk pre_key _key pre_sep sep post_sep _value = (Key _key, ConfigOption renderedKey (Value _value))
      where
        renderedKey = Text.concat [pre_key, _key, pre_sep, sep, post_sep]


option :: Parser (Key, ConfigOption)
option = mk <$> blanks <*> key <*> blanks <*> separator <*> blanks <*> takeLine
  where
    key = takeWhile1 keyClass
    separator = string "=" <|> string ":"

    mk pre_key _key pre_sep sep post_sep _value = (Key _key, ConfigOption renderedKey (Value _value))
      where
        renderedKey = Text.concat [pre_key, _key, pre_sep, sep, post_sep]
option = mk <$> blanks <*> key <*> blanks <*> separator <*> blanks <*> takeLine
  where
    key = takeWhile1 keyClass
    separator = string "=" <|> string ":"

    mk pre_key _key pre_sep sep post_sep _value = (Key _key, ConfigOption renderedKey (Value _value))
      where
        renderedKey = Text.concat [pre_key, _key, pre_sep, sep, post_sep]