Files
coopgo/node_modules/hast-util-to-mdast/lib/handlers/q.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

24 lines
402 B
JavaScript

'use strict'
module.exports = q
var all = require('../all')
function q(h, node) {
var expected = h.quotes[h.qNesting % h.quotes.length]
var contents
h.qNesting++
contents = all(h, node)
h.qNesting--
contents.unshift({type: 'text', value: expected.charAt(0)})
contents.push({
type: 'text',
value: expected.length > 1 ? expected.charAt(1) : expected
})
return contents
}