Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HtmlOutputFormatter.php

function HtmlOutputFormatter::format

Overrides OutputFormatter::format

File

vendor/composer/composer/src/Composer/Console/HtmlOutputFormatter.php, line 64

Class

HtmlOutputFormatter
@author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer\Console

Code

public function format(?string $message) : ?string {
    $formatted = parent::format($message);
    if ($formatted === null) {
        return null;
    }
    $clearEscapeCodes = '(?:39|49|0|22|24|25|27|28)';
    return Preg::replaceCallback("{\x1b\\[([0-9;]+)m(.*?)\x1b\\[(?:" . $clearEscapeCodes . ";)*?" . $clearEscapeCodes . "m}s", Closure::fromCallable([
        $this,
        'formatHtml',
    ]), $formatted);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal