Files
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

15 lines
405 B
JavaScript

module.exports = thematicBreak
var repeat = require('repeat-string')
var checkRepeat = require('../util/check-rule-repeat')
var checkRule = require('../util/check-rule')
function thematicBreak(node, parent, context) {
var value = repeat(
checkRule(context) + (context.options.ruleSpaces ? ' ' : ''),
checkRepeat(context)
)
return context.options.ruleSpaces ? value.slice(0, -1) : value
}