// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { createExtractor } from "./create_extractor.ts";
import { parse } from "jsr:/@std/yaml@^1.0.0-rc.1/parse";
/**
 * Extracts and parses {@link https://yaml.org | YAML} from the metadata of
 * front matter content.
 *
 * @example Extract YAML front matter
 * ```ts
 * import { extract } from "@std/front-matter/yaml";
 * import { assertEquals } from "@std/assert";
 *
 * const output = `---yaml
 * title: Three dashes marks the spot
 * ---
 * Hello, world!`;
 * const result = extract(output);
 *
 * assertEquals(result, {
 *   frontMatter: "title: Three dashes marks the spot",
 *   body: "Hello, world!",
 *   attrs: { title: "Three dashes marks the spot" },
 * });
 * ```
 */ export const extract = createExtractor({
  ["yaml"]: parse
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImh0dHBzOi8vanNyLmlvL0BzdGQvZnJvbnQtbWF0dGVyLzAuMjI0LjMveWFtbC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBDb3B5cmlnaHQgMjAxOC0yMDI0IHRoZSBEZW5vIGF1dGhvcnMuIEFsbCByaWdodHMgcmVzZXJ2ZWQuIE1JVCBsaWNlbnNlLlxuXG5pbXBvcnQge1xuICBjcmVhdGVFeHRyYWN0b3IsXG4gIHR5cGUgRXh0cmFjdG9yLFxuICB0eXBlIFBhcnNlcixcbn0gZnJvbSBcIi4vY3JlYXRlX2V4dHJhY3Rvci50c1wiO1xuaW1wb3J0IHsgcGFyc2UgfSBmcm9tIFwianNyOi9Ac3RkL3lhbWxAXjEuMC4wLXJjLjEvcGFyc2VcIjtcblxuLyoqXG4gKiBFeHRyYWN0cyBhbmQgcGFyc2VzIHtAbGluayBodHRwczovL3lhbWwub3JnIHwgWUFNTH0gZnJvbSB0aGUgbWV0YWRhdGEgb2ZcbiAqIGZyb250IG1hdHRlciBjb250ZW50LlxuICpcbiAqIEBleGFtcGxlIEV4dHJhY3QgWUFNTCBmcm9udCBtYXR0ZXJcbiAqIGBgYHRzXG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