MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / extract_docblock_description

Function extract_docblock_description

src/hover/formatting.rs:513–517  ·  view source on GitHub ↗

Extract the human-readable description text from a raw docblock string. Parses the docblock with `mago-docblock` and returns the free-text content before the first `@tag`, with basic HTML converted to Markdown. Returns `None` if no description text is present.

(docblock: Option<&str>)

Source from the content-addressed store, hash-verified

511/// content before the first `@tag`, with basic HTML converted to Markdown.
512/// Returns `None` if no description text is present.
513pub(crate) fn extract_docblock_description(docblock: Option<&str>) -> Option<String> {
514 let raw = docblock?;
515 let info = parse_docblock_for_tags(raw)?;
516 extract_description_from_info(&info)
517}
518
519/// Shorten all namespace-qualified class names in a type string to their
520/// short (unqualified) form.

Callers 2

hover_from_symbolMethod · 0.85
hover_for_class_infoMethod · 0.85

Calls 2

parse_docblock_for_tagsFunction · 0.85

Tested by

no test coverage detected