Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2693915
D25435.1734770608.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
867 B
Referenced Files
None
Subscribers
None
D25435.1734770608.diff
View Options
diff --git a/src/utils/PhutilCowsay.php b/src/utils/PhutilCowsay.php
--- a/src/utils/PhutilCowsay.php
+++ b/src/utils/PhutilCowsay.php
@@ -71,14 +71,15 @@
$template);
}
- $template = preg_replace_callback(
- '/\\$([a-z]+)/',
- array($this, 'replaceTemplateVariable'),
- $template);
- if ($template === false) {
- throw new Exception(
- pht(
- 'Failed to replace template variables while rendering cow!'));
+ foreach (array('/\\$([a-z]+)/', '/\\${([a-z]+)}/') as $token_pattern) {
+ $template = preg_replace_callback(
+ $token_pattern,
+ array($this, 'replaceTemplateVariable'),
+ $template);
+ if ($template === false) {
+ throw new Exception(
+ pht('Failed to replace template variables while rendering cow!'));
+ }
}
$lines = $this->text;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 08:43 (17 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1024295
Default Alt Text
D25435.1734770608.diff (867 B)
Attached To
Mode
D25435: Fix rendering of cowsay sheep.cow
Attached
Detach File
Event Timeline
Log In to Comment