Jump to >

reviewboard.reviews.chunk_generators

class MarkdownDiffChunkGenerator(old, new, orig_filename, modified_filename, enable_syntax_highlighting=True, encoding_list=None, diff_compat=2)[source]

Bases: reviewboard.diffviewer.chunk_generator.RawDiffChunkGenerator

A chunk generator for rendered Markdown content.

This works like a standard RawDiffChunkGenerator, but handles showing changes within a line for HTML-rendered Markdown.

get_line_changed_regions(old_line_num, old_line, new_line_num, new_line)[source]

Return information on changes between two lines.

This returns the regions between lines of rendered Markdown that have changed.

Only text changes are highlighted, and not formatting changes (such as the addition of bold text).