Skip to content

Commit

Permalink
Fix GH 65 (#133)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
haszi and haszi authored May 29, 2024
1 parent d8ae4df commit 195745e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions phpdotnet/phd/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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),
};
}
Expand Down

0 comments on commit 195745e

Please sign in to comment.