Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/infrastructure/markup/interpreter/PhabricatorRemarkupFigletBlockInterpreter.php b/src/infrastructure/markup/interpreter/PhabricatorRemarkupFigletBlockInterpreter.php
index 517efe9d0f..2314b998f3 100644
--- a/src/infrastructure/markup/interpreter/PhabricatorRemarkupFigletBlockInterpreter.php
+++ b/src/infrastructure/markup/interpreter/PhabricatorRemarkupFigletBlockInterpreter.php
@@ -1,43 +1,45 @@
<?php
final class PhabricatorRemarkupFigletBlockInterpreter
extends PhutilRemarkupBlockInterpreter {
public function getInterpreterName() {
return 'figlet';
}
public function markupContent($content, array $argv) {
if (!Filesystem::binaryExists('figlet')) {
return $this->markupError(
pht('Unable to locate the `figlet` binary. Install figlet.'));
}
$font = idx($argv, 'font', 'standard');
$safe_font = preg_replace('/[^0-9a-zA-Z-_.]/', '', $font);
$future = id(new ExecFuture('figlet -f %s', $safe_font))
->setTimeout(15)
->write(trim($content, "\n"));
list($err, $stdout, $stderr) = $future->resolve();
if ($err) {
return $this->markupError(
pht(
- 'Execution of `figlet` failed:', $stderr));
+ 'Execution of `%s` failed: %s',
+ 'figlet',
+ $stderr));
}
if ($this->getEngine()->isTextMode()) {
return $stdout;
}
return phutil_tag(
'div',
array(
'class' => 'PhabricatorMonospaced remarkup-figlet',
),
$stdout);
}
}

File Metadata

Mime Type
text/x-diff
Expires
Thu, Aug 14, 8:28 AM (1 d, 22 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
202228
Default Alt Text
(1 KB)

Event Timeline