Fix hex color regex

Same problem as with type constructors #4744

Fixes #4752
This commit is contained in:
Jakub Valtar
2016-11-24 22:16:40 +01:00
parent 30ea717b7b
commit 7b3719ad8f

View File

@@ -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]