|
|
@ -8,7 +8,7 @@ export interface PreprocessorGroup {
|
|
|
|
markup?: (options: {
|
|
|
|
markup?: (options: {
|
|
|
|
content: string;
|
|
|
|
content: string;
|
|
|
|
filename: string;
|
|
|
|
filename: string;
|
|
|
|
}) => Processed;
|
|
|
|
}) => Processed | Promise<Processed>;
|
|
|
|
style?: Preprocessor;
|
|
|
|
style?: Preprocessor;
|
|
|
|
script?: Preprocessor;
|
|
|
|
script?: Preprocessor;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -17,7 +17,7 @@ export type Preprocessor = (options: {
|
|
|
|
content: string;
|
|
|
|
content: string;
|
|
|
|
attributes: Record<string, string | boolean>;
|
|
|
|
attributes: Record<string, string | boolean>;
|
|
|
|
filename?: string;
|
|
|
|
filename?: string;
|
|
|
|
}) => Processed;
|
|
|
|
}) => Processed | Promise<Processed>;
|
|
|
|
|
|
|
|
|
|
|
|
function parse_attributes(str: string) {
|
|
|
|
function parse_attributes(str: string) {
|
|
|
|
const attrs = {};
|
|
|
|
const attrs = {};
|
|
|
|