You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
405 B
14 lines
405 B
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 |
|
}
|
|
|