src/vs/editor/contrib/format/browser/formattingEdit.ts/FormattingEdit/execute
class FormattingEdit:	static execute(editor: ICodeEditor, _edits: TextEdit[], addUndoStops: boolean) {
		if (addUndoStops) {
			editor.pushUndoStop();
		}
		const edits = FormattingEdit._handleEolEdits(editor, _edits);
		if (edits.length === 1 && FormattingEdit._isFullModelReplaceEdit(editor, edits[0])) {
			// We use replace semantics and hope that markers stay put...
			editor.executeEdits('formatEditsCommand', edits.map(edit => EditOperation.replace(Range.lift(edit.range), edit.text)));
		} else {
			editor.executeEdits('formatEditsCommand', edits.map(edit => EditOperation.replaceMove(Range.lift(edit.range), edit.text)));
		}
		if (addUndoStops) {
			editor.pushUndoStop();
		}
	}