diff --git a/src/Plugin/UiPatterns/Source/AttributesWidget.php b/src/Plugin/UiPatterns/Source/AttributesWidget.php index 15741cb2617b94c6b637a084f2a0dee7483d1b09..6c0581292be69d16b2663e74686615b1c170bbf5 100644 --- a/src/Plugin/UiPatterns/Source/AttributesWidget.php +++ b/src/Plugin/UiPatterns/Source/AttributesWidget.php @@ -63,9 +63,9 @@ class AttributesWidget extends SourcePluginBase { */ protected function buildRegexPattern(): string { // Attribute names are a mix of ASCII lower and upper alphas. - $attr_name = "[a-zA-Z]+"; + $attr_name = "[a-zA-Z\-]+"; // Allow anything in attributes values, which are between double quotes. - $double_quoted_value = '"[\s\w]*"'; + $double_quoted_value = '"[\s\w\-]*"'; $space = "\s*"; $attr = $attr_name . "=" . $double_quoted_value . $space; // The pattern must match the entire input's value, rather than matching a