Background:
The marked-alert extension enables usage of GFM alerts.
To use this extension (and maybe some others) the current marked:extensions filter is not enough since it only provides the extensions property but the altert extension also requires walkTokens to be set in marked.use(...).
This PR adds a marked:use filter allowing the usage of the marked.use function in a theme.
Usage example:
const markedAlert = require('marked-alert');
hexo.extend.filter.register('marked:use', function (markedUse) {
markedUse(markedAlert());
});
coverage: 100.0%. remained the same
when pulling d192435ffc3820bbe6001c04dc4531bd39932793 on crycode-de:master
into 1b0935497529ef4dbf81b5c42abc0a3289c91b2c on hexojs:master.
Background: The marked-alert extension enables usage of GFM alerts. To use this extension (and maybe some others) the current
marked:extensions
filter is not enough since it only provides theextensions
property but the altert extension also requireswalkTokens
to be set inmarked.use(...)
.This PR adds a
marked:use
filter allowing the usage of themarked.use
function in a theme.Usage example: