1
0
mirror of https://github.com/php/phd.git synced 2026-03-23 22:52:05 +01:00

Support enum display version info (#191)

This commit is contained in:
Luffy
2025-03-06 20:33:05 +08:00
committed by GitHub
parent 0b690001ae
commit b09ca0b9da

View File

@@ -1075,6 +1075,7 @@ abstract class Package_PHP_XHTML extends Package_Generic_XHTML {
public function format_reference($open, $name, $attrs, $props) {
if (isset($attrs[Reader::XMLNS_DOCBOOK]['role'])) {
if ($attrs[Reader::XMLNS_DOCBOOK]['role'] === "class"
|| $attrs[Reader::XMLNS_DOCBOOK]['role'] === "enum"
|| $attrs[Reader::XMLNS_DOCBOOK]['role'] === "exception") {
if ($open) {
$this->pushRole($attrs[Reader::XMLNS_DOCBOOK]['role']);
@@ -1089,6 +1090,7 @@ abstract class Package_PHP_XHTML extends Package_Generic_XHTML {
public function format_reference_titleabbrev_text($value, $tag) {
if ($this->getRole() === "class"
|| $this->getRole() === "enum"
|| $this->getRole() === "exception") {
return $this->format_grep_classname_text($value, $tag);
}