Gregwar\RST\Parser::directiveAddOption PHP Method

directiveAddOption() protected method

Try to add an option line to the current directive, returns true if sucess and false if failure
protected directiveAddOption ( string $line )
$line string
    protected function directiveAddOption($line)
    {
        if (preg_match('/^(\\s+):(.+): (.*)$/mUsi', $line, $match)) {
            $this->directive['options'][$match[2]] = trim($match[3]);
            return true;
        } else {
            if (preg_match('/^(\\s+):(.+):(\\s*)$/mUsi', $line, $match)) {
                $value = trim($match[3]);
                $this->directive['options'][$match[2]] = true;
                return true;
            } else {
                return false;
            }
        }
    }