mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 12:33:47 +08:00
Bug: none Change-Id: I02ef1182143b7fe091ce92d59f04ac2188903e0d Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2886925 Commit-Queue: Jack Franklin <jacktfranklin@chromium.org> Auto-Submit: Jack Franklin <jacktfranklin@chromium.org> Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org>
16 lines
542 B
TypeScript
16 lines
542 B
TypeScript
// Copyright 2016 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import type {FormattedContentBuilder} from './FormattedContentBuilder.js';
|
|
|
|
export class IdentityFormatter {
|
|
constructor(private builder: FormattedContentBuilder) {
|
|
}
|
|
|
|
format(text: string, lineEndings: number[], fromOffset: number, toOffset: number): void {
|
|
const content = text.substring(fromOffset, toOffset);
|
|
this.builder.addToken(content, fromOffset);
|
|
}
|
|
}
|