Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/src/format/format-handlers.ts
6449 views
1
/*
2
* format-handlers.ts
3
*
4
* Copyright (C) 2020-2023 Posit Software, PBC
5
*/
6
7
import { Format } from "../config/types.ts";
8
9
export type WriterFormatHandler = (to: string) => {
10
format: Format;
11
pandocTo?: string;
12
} | undefined;
13
14
export const writerFormatHandlers: WriterFormatHandler[] = [];
15
16
export function registerWriterFormatHandler(
17
handler: WriterFormatHandler,
18
): void {
19
writerFormatHandlers.push(handler);
20
}
21
22