🎉 initiate project *astro_rewrite*
This commit is contained in:
parent
ffd4d5e86c
commit
2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions
22
node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js
generated
vendored
Normal file
22
node_modules/mdast-util-to-markdown/lib/handle/thematic-break.js
generated
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/**
|
||||
* @typedef {import('mdast').ThematicBreak} ThematicBreak
|
||||
* @typedef {import('../types.js').Parent} Parent
|
||||
* @typedef {import('../types.js').State} State
|
||||
*/
|
||||
|
||||
import {checkRuleRepetition} from '../util/check-rule-repetition.js'
|
||||
import {checkRule} from '../util/check-rule.js'
|
||||
|
||||
/**
|
||||
* @param {ThematicBreak} _
|
||||
* @param {Parent | undefined} _1
|
||||
* @param {State} state
|
||||
* @returns {string}
|
||||
*/
|
||||
export function thematicBreak(_, _1, state) {
|
||||
const value = (
|
||||
checkRule(state) + (state.options.ruleSpaces ? ' ' : '')
|
||||
).repeat(checkRuleRepetition(state))
|
||||
|
||||
return state.options.ruleSpaces ? value.slice(0, -1) : value
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue