node/tools/eslint/node_modules/micromark/lib/util/move-point.js
Michaël Zasso 2eff28fb7a
tools: move ESLint to tools/eslint
Greatly simplify how ESLint and its plugins are installed.

PR-URL: https://github.com/nodejs/node/pull/53413
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-06-19 19:54:08 +00:00

13 lines
315 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use strict'
// Note! `move` only works inside lines! Its 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
}
module.exports = movePoint