mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
diff engine, help needed
This commit is contained in:
parent
7f08765ba7
commit
47be98ed1c
1 changed files with 21 additions and 0 deletions
21
lib/diff_engine.rb
Normal file
21
lib/diff_engine.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
# 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
|
||||
#
|
||||
# retruns: 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
|
Loading…
Reference in a new issue