docs(encoding/front_matter): fix example (#2437)

This commit is contained in:
Yoshiya Hinosawa 2022-07-12 20:50:55 +09:00 committed by GitHub
parent f26ad9954e
commit e2f3f58fb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ export type Extract<T> = {
* const { attrs, body, frontMatter } = extract<{ title: string }>("---\ntitle: Three dashes marks the spot\n---\n");
* assertEquals(attrs.title, "Three dashes marks the spot");
* assertEquals(body, "");
* assertEquals(frontMatter, "---\ntitle: Three dashes marks the spot\n---\n");
* assertEquals(frontMatter, "title: Three dashes marks the spot");
* ```
*/
export function extract<T = unknown>(str: string): Extract<T> {