reviewboard.reviews.ui.markdownui¶
A Review UI for Markdown files.
- class MarkdownReviewUI(review_request: ReviewRequest, obj: ReviewableType)[source]¶
Bases:
TextBasedReviewUI
A Review UI for Markdown files.
This renders the markdown to HTML, and allows users to comment on each top-level block (header, paragraph, list, code block, etc).
- supported_mimetypes: ClassVar[list[str]] = ['text/markdown', 'text/x-markdown'][source]¶
The list of MIME types that this Review UI supports.
- rendered_chunk_generator_cls[source]¶
alias of
MarkdownDiffChunkGenerator
- extra_css_classes: list[str] = ['markdown-review-ui'][source]¶
Extra classes to apply to the Review UI element.
- generate_render() Iterator[str] [source]¶
Generate a render of the text.
- Yields:
str
– The rendered lines of content.
- get_source_lexer(filename, data)[source]¶
Return the lexer that should be used for the text.
By default, this will attempt to guess the lexer based on the filename, falling back to a plain-text lexer.
Subclasses can override this to choose a more specific lexer.
- __annotations__ = {'allow_inline': 'ClassVar[bool]', 'css_bundle_names': 'ClassVar[list[str]]', 'diff_against_obj': 'Optional[ReviewableType]', 'diff_type_mismatch': 'ClassVar[bool]', 'extra_css_classes': 'list[str]', 'js_bundle_names': 'ClassVar[list[str]]', 'js_files': 'ClassVar[list[str]]', 'js_model_class': 'str', 'js_view_class': 'str', 'name': 'ClassVar[str]', 'obj': 'ReviewableType', 'object_key': 'str', 'request': 'Optional[HttpRequest]', 'supported_mimetypes': 'ClassVar[list[str]]', 'supports_diffing': 'ClassVar[bool]', 'supports_file_attachments': 'ClassVar[bool]', 'template_name': 'ClassVar[str]'}¶
- __parameters__ = ()¶