refactor: clean up TODO comments (#6399)

This commit is contained in:
Joshua Chen 2022-01-19 12:10:50 +08:00 committed by GitHub
parent 1d7827d572
commit 6c0da3ee4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 21 additions and 27 deletions

View file

@ -62,9 +62,7 @@ export function shouldQuotifyFrontMatter([key, value]: [
if (String(value).match(/^("|').+("|')$/)) {
return false;
}
// TODO weird graymatter case
// title: !something need quotes
// but not title: something!
// title: !something needs quotes because otherwise it's a YAML tag.
if (!String(value).trim().match(/^\w.*/)) {
return true;
}