Files
coopgo/node_modules/mdast-util-to-markdown/lib/util/check-list-item-indent.js
sgauthier 6e64e138e2
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s
planning
2024-10-14 09:15:30 +02:00

20 lines
439 B
JavaScript

module.exports = checkListItemIndent
function checkListItemIndent(context) {
var style = context.options.listItemIndent || 'tab'
if (style === 1 || style === '1') {
return 'one'
}
if (style !== 'tab' && style !== 'one' && style !== 'mixed') {
throw new Error(
'Cannot serialize items with `' +
style +
'` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`'
)
}
return style
}