27 lines
414 B
JavaScript
27 lines
414 B
JavaScript
import { defaults } from './defaults.js';
|
|
|
|
export class Hooks {
|
|
constructor(options) {
|
|
this.options = options || defaults;
|
|
}
|
|
|
|
static passThroughHooks = new Set([
|
|
'preprocess',
|
|
'postprocess'
|
|
]);
|
|
|
|
/**
|
|
* Process markdown before marked
|
|
*/
|
|
preprocess(markdown) {
|
|
return markdown;
|
|
}
|
|
|
|
/**
|
|
* Process HTML after marked is finished
|
|
*/
|
|
postprocess(html) {
|
|
return html;
|
|
}
|
|
}
|