So I am successfully parsing frontmatter with
YAML.load_file(stringForFilePath, permitted_classes: ['Date'])
on a whole bunch of files except on a single file I get this error:
control characters are not allowed at line 1 column 1 (Psych::SyntaxError)
Things I have tried:
- Putting the frontmatter / YAML in a validator to check for errors
- Deleting the entire frontmatter and put in a basic stub in its place.
- Checked the file encoding (UTF-8 same as other files that are working)
- Checked the line endings (CLRF same as other files that are working)
- Removing every non-ASCII character from the file (e.g. the HTML, there was none in frontmatter)