Page MenuHomePhabricator

Maplink extractMarkerCss does not extract the color hex code correctly
Closed, ResolvedPublic

Description

How to quickly reproduce the bug:

<?php
preg_match( '/^#?(([0-9a-fA-F]{3}){1,2})$/', '#abcdef', $m );
var_dump($m);

outputs:

array(3) { [0]=> string(4) "#abc" [1]=> string(3) "abc" [2]=> string(3) "abc" }

And since the method currently returns return "background: #{$m[2]};";, the extracted color is: #abc instead of #abcdef.