0.24.0 • Published 4 years ago
@xmark/transform-shower v0.24.0
@xmark/transform-shower
xmark plugin to add certain elements for hast to use with shower, must be used together with @xmark/transform-wrap-headings
Usage
yarn add @xmark/core @xmark/transform-wrap-headings @xmark/theme-shower-ribbon @xmark/transform-shower
const XMark = require('@xmark/core');
const wrap = require('@xmark/transform-wrap-headings');
const shower = require('@xmark/transform-shower');
const theme = require('@xmark/theme-shower-ribbon');
const xmark = XMark();
// We just need to wrap h2 headings for shower to work
xmark.useTransform(wrap, {
parseAttributes: true,
parseStyleAttributes: true,
wrapperTag: 'section',
enabledHeadings: ['h2'],
wrapperClasses: {
wrapper: 'slide',
modifier: x => `slide--level${x}`,
},
});
xmark.useTransform(shower, {
caption: false,
progress: false,
wrapper: false,
});
xmark.useTheme(theme);
const markdown = `
// SEE slide.md for documentation
`;
const hast = xmark.toHAST(markdown);
console.log(hast);
0.24.0
4 years ago
0.23.1
4 years ago
0.22.0
4 years ago
0.21.0
4 years ago
0.20.0
5 years ago
0.19.0
5 years ago
0.18.0
5 years ago
0.17.0
5 years ago
0.16.0
5 years ago
0.15.0
5 years ago
0.14.0
5 years ago
0.13.0
5 years ago
0.12.0
5 years ago
0.11.0
5 years ago
0.10.0
5 years ago
0.9.3
5 years ago
0.9.2
5 years ago
0.9.1
5 years ago
0.8.0
5 years ago
0.7.0
5 years ago
0.6.0
5 years ago
0.5.0
5 years ago
0.4.1
5 years ago
0.3.0
5 years ago
0.2.1
5 years ago
0.2.0
5 years ago