@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
41 lines • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ResultImpl = exports.RenderingResultImpl = void 0;
/**
* RenderingResultImpl implements RenderingResult
*/
class RenderingResultImpl {
constructor(buffer) {
this.buffer = buffer;
}
bytes() {
return this.buffer.bytes();
}
toString() {
const decoder = new TextDecoder();
return decoder.decode(this.bytes());
}
}
exports.RenderingResultImpl = RenderingResultImpl;
/**
* Result implementation combining parsing and rendering results
*/
class ResultImpl {
constructor(parsingResult, renderingResult) {
this.parsingResult = parsingResult;
this.renderingResult = renderingResult;
}
// ParsingResult methods
headers() {
return this.parsingResult.headers();
}
tableOfContents() {
return this.parsingResult.tableOfContents();
}
// RenderingResult methods
bytes() {
return this.renderingResult.bytes();
}
}
exports.ResultImpl = ResultImpl;
//# sourceMappingURL=parserresult.js.map