Conflict/packages/stat-sheet-block/src/stat-sheet-block.js

19 lines
476 B
JavaScript

function StatSheetBlock() {
this.named("stat-sheet");
this.onContext("paragraph");
this.process((parent, reader) => {
const lines = reader.getLines().map((line) => line.toUpperCase());
return this.createBlock(parent, "paragraph", lines);
});
}
module.exports.register = function register(registry) {
if (registry.register) {
registry.register(function () {
this.block(StatSheetBlock);
});
} else {
registry.block(StatSheetBlock);
}
};