This commit is contained in:
10
node_modules/micromark/lib/util/move-point.mjs
generated
vendored
Normal file
10
node_modules/micromark/lib/util/move-point.mjs
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
export default movePoint
|
||||
|
||||
// Note! `move` only works inside lines! It’s not possible to move past other
|
||||
// chunks (replacement characters, tabs, or line endings).
|
||||
function movePoint(point, offset) {
|
||||
point.column += offset
|
||||
point.offset += offset
|
||||
point._bufferIndex += offset
|
||||
return point
|
||||
}
|
||||
Reference in New Issue
Block a user