planning
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s

This commit is contained in:
2024-10-14 09:15:30 +02:00
parent bcba00a730
commit 6e64e138e2
21059 changed files with 2317811 additions and 1 deletions

29
node_modules/micromark/lib/util/slice-chunks.mjs generated vendored Normal file
View File

@@ -0,0 +1,29 @@
export default sliceChunks
import assert from 'assert'
function sliceChunks(chunks, token) {
var startIndex = token.start._index
var startBufferIndex = token.start._bufferIndex
var endIndex = token.end._index
var endBufferIndex = token.end._bufferIndex
var view
if (startIndex === endIndex) {
assert(endBufferIndex > -1, 'expected non-negative end buffer index')
assert(startBufferIndex > -1, 'expected non-negative start buffer index')
view = [chunks[startIndex].slice(startBufferIndex, endBufferIndex)]
} else {
view = chunks.slice(startIndex, endIndex)
if (startBufferIndex > -1) {
view[0] = view[0].slice(startBufferIndex)
}
if (endBufferIndex > 0) {
view.push(chunks[endIndex].slice(0, endBufferIndex))
}
}
return view
}