Skip to content

Commit

Permalink
refactor(front-matter): remove Extractor type (#5659)
Browse files Browse the repository at this point in the history
  • Loading branch information
timreichen authored Aug 8, 2024
1 parent c7a39f0 commit 860f578
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 21 deletions.
6 changes: 6 additions & 0 deletions front_matter/_formats.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

/**
* Supported format for front matter. `"unknown"` is used when auto format
* detection logic fails.
*/
export type Format = "yaml" | "toml" | "json";

const BOM = "\\ufeff?";

const YAML_DELIMITER = "= yaml =|---";
Expand Down
3 changes: 1 addition & 2 deletions front_matter/_shared.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

import { RECOGNIZE_REGEXP_MAP } from "./_formats.ts";
import type { Format } from "./_types.ts";
import { type Format, RECOGNIZE_REGEXP_MAP } from "./_formats.ts";
import type { Extract } from "./types.ts";

/** Parser function type */
Expand Down
17 changes: 0 additions & 17 deletions front_matter/_types.ts

This file was deleted.

3 changes: 1 addition & 2 deletions front_matter/test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

import { EXTRACT_REGEXP_MAP } from "./_formats.ts";
import type { Format } from "./_types.ts";
import { EXTRACT_REGEXP_MAP, type Format } from "./_formats.ts";

export type { Format };

Expand Down

0 comments on commit 860f578

Please sign in to comment.