mirror of
https://github.com/discourse/discourse.git
synced 2024-12-18 13:23:52 +08:00
22 lines
633 B
Ruby
22 lines
633 B
Ruby
# This class is used to generate diffs, it will be consumed by the UI on
|
|
# on the client the displays diffs.
|
|
#
|
|
# Ruby has the diff/lcs engine that can do some of the work, the devil
|
|
# is in the details
|
|
|
|
class DiffEngine
|
|
|
|
# generate an html friendly diff similar to the way Stack Exchange generate
|
|
# html diffs
|
|
#
|
|
# returns: html containing decorations indicating the changes
|
|
def self.html_diff(html_before, html_after)
|
|
end
|
|
|
|
# same as html diff, except that it operates on markdown
|
|
#
|
|
# returns html containing decorated areas where diff happened
|
|
def self.markdown_diff(markdown_before, markdown_after)
|
|
end
|
|
end
|