mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
15 lines
417 B
JavaScript
15 lines
417 B
JavaScript
module.exports = function render(input, out) {
|
|
var contentMap = input.content;
|
|
var content = contentMap ? contentMap[input.name] : null;
|
|
if (content) {
|
|
if (content.value) {
|
|
out.write(content.value);
|
|
} else if (content.renderBody) {
|
|
content.renderBody(out);
|
|
}
|
|
} else {
|
|
if (input.renderBody) {
|
|
input.renderBody(out);
|
|
}
|
|
}
|
|
}; |