Merge pull request #4753 from JakubValtar/fix-hexcolor-regex

Fix hex color regex
This commit is contained in:
Ben Fry
2016-11-29 11:42:50 -05:00
committed by GitHub
@@ -84,7 +84,7 @@ public class SourceUtils {
public static final Pattern HEX_LITERAL_REGEX =
Pattern.compile("(?:^|\\W)(#[A-Fa-f0-9]{6})(?:\\W|$)");
Pattern.compile("(?<=^|\\W)(#[A-Fa-f0-9]{6})(?=\\W|$)");
public static List<Edit> replaceHexLiterals(CharSequence source) {
// Find all #[webcolor] and replace with 0xff[webcolor]