Skip to main content
Module

x/pbkit/language-server/lsp.ts>MarkupContent

Protobuf toolkit for modern web development
Latest
interface MarkupContent
import { type MarkupContent } from "https://deno.land/x/pbkit@v0.0.70/language-server/lsp.ts";

A MarkupContent literal represents a string value which content is interpreted base on its kind flag. Currently the protocol supports plaintext and markdown as markup kinds.

If the kind is markdown then the value can contain fenced code blocks like in GitHub issues.

Here is an example how such a string can be constructed using JavaScript / TypeScript:

let markdown: MarkdownContent = {
	kind: MarkupKind.Markdown,
	value: [
		'# Header',
		'Some text',
		'```typescript',
		'someCode();',
		'```'
	].join('\n')
};

Please Note that clients might sanitize the return markdown. A client could decide to remove HTML from the markdown to avoid script execution.

Properties

The type of the Markup

value: string

The content itself