diff --git a/phpdotnet/phd/Package/Generic/XHTML.php b/phpdotnet/phd/Package/Generic/XHTML.php
index e74fc254..57e99bc7 100644
--- a/phpdotnet/phd/Package/Generic/XHTML.php
+++ b/phpdotnet/phd/Package/Generic/XHTML.php
@@ -525,7 +525,7 @@ abstract class Package_Generic_XHTML extends Format_Abstract_XHTML {
protected $isSectionChunk = array();
protected $params = array();
- private bool $classHasAttributes = false;
+ protected bool $classHasAttributes = false;
public function __construct() {
parent::__construct();
diff --git a/phpdotnet/phd/Package/PHP/XHTML.php b/phpdotnet/phd/Package/PHP/XHTML.php
index 912ef562..f0aebfed 100644
--- a/phpdotnet/phd/Package/PHP/XHTML.php
+++ b/phpdotnet/phd/Package/PHP/XHTML.php
@@ -413,6 +413,10 @@ public function format_methodsynopsis_type($open, $tag, $attrs) {
"intersection" => "&",
};
}
+ if ($this->classHasAttributes) {
+ $this->classHasAttributes = false;
+ return "
";
+ }
} else {
if (
isset($attrs[Reader::XMLNS_DOCBOOK]["class"])
diff --git a/tests/package/generic/attribute_formatting_002.phpt b/tests/package/generic/attribute_formatting_002.phpt
index 44e0c909..4a9b0aac 100644
--- a/tests/package/generic/attribute_formatting_002.phpt
+++ b/tests/package/generic/attribute_formatting_002.phpt
@@ -150,4 +150,21 @@ Content:
}
+
9. Function with unknown attributes
+10. Function with known attributes
+ + +