From 195745eb00f8e69114f827861d9f1504299f839e Mon Sep 17 00:00:00 2001 From: haszi Date: Wed, 29 May 2024 13:02:31 +0200 Subject: [PATCH] Fix GH 65 (#133) Remove spurious entries some language documentations have in the function/method listing. The spurious entries were the stream wrapper and context options which were listed in refentry elements. PhD assumes that refentry elements are always functions/methods. Fix this by giving stream wrappers and context options a role attribute with an appropriate value and handling these roles/values during indexing in PhD. Co-authored-by: haszi --- phpdotnet/phd/Index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpdotnet/phd/Index.php b/phpdotnet/phd/Index.php index fc7457a4..77e0b0fe 100644 --- a/phpdotnet/phd/Index.php +++ b/phpdotnet/phd/Index.php @@ -297,6 +297,8 @@ public function format_refentry($open, $name, $attrs, $props) { 'class', 'enum' => $this->format_container_chunk($open, 'phpdoc:classref', $attrs, $props), 'exception' => $this->format_container_chunk($open, 'phpdoc:exceptionref', $attrs, $props), 'variable' => $this->format_chunk($open, 'phpdoc:varentry', $attrs, $props), + 'stream_wrapper' => $this->format_chunk($open, 'stream_wrapper', $attrs, $props), + 'stream_context_option' => $this->format_chunk($open, 'stream_context_option', $attrs, $props), default => $this->format_chunk($open, $name, $attrs, $props), }; }