src/Content/Parser.php
public function parse()
    {
        preg_match(
            '/'.self::PATTERN.'/s',
            Util::filesystem()->read($this->file->getPathName()),
            $matches
        );

        if (!$matches) {
            $this->body = Util::filesystem()->read($this->file->getPathName());

            return $this;
        }

        try {
            $this->attributes = Yaml::parse($matches[1]);
        } catch (ParseException $e) {
        }

        $this->body = trim($matches[2]);

        return $this;
    }
public function parse()
    {
        preg_match(
            '/'.self::PATTERN.'/s',
            Util::filesystem()->read($this->file->getPathName()),
            $matches
        );

        if (!$matches) {
            $this->body = Util::filesystem()->read($this->file->getPathName());

            return $this;
        }

        try {
            $this->attributes = Yaml::parse($matches[1]);
        } catch (ParseException $e) {
        }

        $this->body = trim($matches[2]);

        return $this;
    }
Parse the contents of the file.

@throws \RuntimeException

@return $this