<commit_before>import {
  ChangeDetectionStrategy,
  Component,
  Input,
  TemplateRef,
} from '@angular/core';

import { SkyFormatItem } from './format-item';

const tokenRegex = /(\{\d+\})/;

@Component({
  selector: 'sky-format',
  templateUrl: './format.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class SkyFormatComponent {
  public itemsForDisplay: SkyFormatItem[];

  /**
   * The tokenized string that represents the template. Tokens use the `{n}` notation
   * where n is the ordinal of the item to replace the token.
   */
  @Input()
  public set text(value: string) {
    this._text = value;
    this.updateItemsForDisplay();
  }

  public get text(): string {
    return this._text;
  }

  /**
   * An array of `TemplateRef` objects to be placed in the template, where the `nth`
   * item is placed at the `{n}` location in the template.
   */<commit_msg>docs(components/layout): add code formatting to an instance of the `n` token in the text field's description (#55)<commit_after>import {
  ChangeDetectionStrategy,
  Component,
  Input,
  TemplateRef,
} from '@angular/core';

import { SkyFormatItem } from './format-item';

const tokenRegex = /(\{\d+\})/;

@Component({
  selector: 'sky-format',
  templateUrl: './format.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class SkyFormatComponent {
  public itemsForDisplay: SkyFormatItem[];

  /**
   * The tokenized string that represents the template. Tokens use the `{n}` notation
   * where `n` is the ordinal of the item to replace the token.
   */
  @Input()
  public set text(value: string) {
    this._text = value;
    this.updateItemsForDisplay();
  }

  public get text(): string {
    return this._text;
  }

  /**
   * An array of `TemplateRef` objects to be placed in the template, where the `nth`
   * item is placed at the `{n}` location in the template.
   */
{'fraction_non_alphanumeric': 0.12388451443569554, 'fraction_numerical': 0.0010498687664041995, 'mean_word_length': 3.581730769230769, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5711685', 'n_tokens_mistral': 581, 'n_tokens_neox': 573, 'n_words': 194}