decor-6-site/assets/js/plugins/ragadjust-hook.js
2026-01-05 19:33:15 +01:00

14 lines
No EOL
433 B
JavaScript
Executable file

class ragadjustHandler extends Paged.Handler {
constructor(chunker, polisher, caller) {
super(chunker, polisher, caller);
}
beforeParsed(content) {
// Adjusts the headers by adding a non-breaking space after
// all the prepositions listed, and without any whitelisted
// word.
ragadjust('p,h1,h2,h3,h4,h5,h6,li', ['determiners', 'pronouns', 'dashes'], [], content);
}
}
Paged.registerHandlers(ragadjustHandler);