mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Enable figlet to render text using custom fonts
Summary: Figlet with more fonts will make Phabricator ``` _/ _/ _/ _/_/ _/ _/_/ _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/_/ _/_/_/ _/_/ _/_/ _/ _/_/ _/_/ _/ _/ _/ _/ _/ _/_/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/_/_/ _/ _/_/_/ _/_/ _/ _/_/ _/_/ _/ _/ _/_/_/ _/_/ _/_/_/_/ _/_/ _/ _/ _/ _/ _/ _/_/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/_/_/ _/_/_/ _/ _/ _/_/ _/_/_/ _/_/_/ ``` Test Plan: Use figlet in comment with no font/various fonts as argument (e.g. lean, script) and see preview with no errors. Reviewers: #blessed_reviewers, epriestley Reviewed By: epriestley CC: epriestley, aran Differential Revision: https://secure.phabricator.com/D7815
This commit is contained in:
parent
e27bbb9aa5
commit
a70de394e1
1 changed files with 3 additions and 1 deletions
|
@ -13,7 +13,9 @@ final class PhabricatorRemarkupBlockInterpreterFiglet
|
|||
pht('Unable to locate the `figlet` binary. Install figlet.'));
|
||||
}
|
||||
|
||||
$future = id(new ExecFuture('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"));
|
||||
|
||||
|
|
Loading…
Reference in a new issue