Massive-Wiki / massivewikibuilder

Massive Wiki Builder
MIT License
3 stars 3 forks source link

Don't crash on YAML parsing errors #18

Open peterkaminski opened 2 years ago

peterkaminski commented 2 years ago

A tab character indentation in the YAML frontmatter of a page caused MWB crash.

MWB should not crash if the YAML isn't parseable by the yaml processor; it could ignore the YAML frontmatter or do some other kind of soft, non-fatal error.

1:19:39 PM:   File "/opt/buildhome/python3.8/lib/python3.8/site-packages/yaml/scanner.py", line 258, in fetch_more_tokens
1:19:39 PM:     raise ScannerError("while scanning for the next token", None,
1:19:39 PM: yaml.scanner.ScannerError: while scanning for the next token
1:19:39 PM: found character '\t' that cannot start any token
1:19:39 PM:   in "<unicode string>", line 11, column 3:
1:19:39 PM:         author: Anon
1:19:39 PM:       ^