mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
Fix hex color regex
Same problem as with type constructors #4744 Fixes #4752
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user