astro-ghostcms/.pnpm-store/v3/files/47/e7254c503f66c5a9a439a26572f...

33 lines
717 B
Plaintext
Raw Normal View History

2024-02-14 14:10:47 +00:00
/**
* @typedef {import('hast').Doctype} Doctype
* @typedef {import('hast').Parents} Parents
*
* @typedef {import('../index.js').State} State
*/
// Make VS code see references to the above types.
''
/**
* Serialize a doctype.
*
* @param {Doctype} _1
* Node to handle.
* @param {number | undefined} _2
* Index of `node` in `parent.
* @param {Parents | undefined} _3
* Parent of `node`.
* @param {State} state
* Info passed around about the current state.
* @returns {string}
* Serialized node.
*/
export function doctype(_1, _2, _3, state) {
return (
'<!' +
(state.settings.upperDoctype ? 'DOCTYPE' : 'doctype') +
(state.settings.tightDoctype ? '' : ' ') +
'html>'
)
}