diff --git a/phpdotnet/phd/Package/Generic/XHTML.php b/phpdotnet/phd/Package/Generic/XHTML.php index 0b5fb7fd..e5cdaed5 100644 --- a/phpdotnet/phd/Package/Generic/XHTML.php +++ b/phpdotnet/phd/Package/Generic/XHTML.php @@ -1427,6 +1427,7 @@ public function format_fieldsynopsis($open, $name, $attrs) { } public function format_fieldsynopsis_modifier_text($value, $tag) { + $this->cchunk["fieldsynopsis"]["modifier"] = trim($value); if ($this->getRole() === "attribute") { $attribute = trim(strtolower($value), "#[]\\"); $href = Format::getFilename("class.$attribute"); @@ -1435,7 +1436,6 @@ public function format_fieldsynopsis_modifier_text($value, $tag) { } return false; } - $this->cchunk["fieldsynopsis"]["modifier"] = trim($value); return $this->TEXT($value); } diff --git a/tests/package/generic/attribute_formatting_003.phpt b/tests/package/generic/attribute_formatting_003.phpt index ded7e667..00ce7e77 100644 --- a/tests/package/generic/attribute_formatting_003.phpt +++ b/tests/package/generic/attribute_formatting_003.phpt @@ -85,4 +85,21 @@ Content: } +
+

3. Constant of a class with attribute

+
+ + #[\UnknownAttribute]
+ class ClassName + {
+
/* Constants */
+
+ public + const + string + CONSTANT_NAME;
+ + }
+
+ diff --git a/tests/package/generic/data/attribute_formatting_003.xml b/tests/package/generic/data/attribute_formatting_003.xml index 3905c5c8..f3de65c9 100644 --- a/tests/package/generic/data/attribute_formatting_003.xml +++ b/tests/package/generic/data/attribute_formatting_003.xml @@ -35,4 +35,21 @@ +
+ 3. Constant of a class with attribute + + + #[\UnknownAttribute] + ClassName + + Constants + + public + const + string + CONSTANT_NAME + + +
+