markdiff 0.5.5 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2346464a728f27b53d6e41867c54f6fc98be7b3
|
4
|
+
data.tar.gz: 39a6911a132f9fdf92d55fe0de403148670c14af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2ee80ab7bedc30ff0eff09a4cff8115fb7200e1433bc5cfb0330a64dafb28a10c351175a3268ee7c7d1115ef19b5df468a51c6837ba135d385ef870e5c27ee7
|
7
|
+
data.tar.gz: 5ee096c2d67f82ea0434f9c925a821cdf2458bae9942f5c0c34d141a8460f5bb1292afbf7c5fee89246d9926382627140b50175bf01fa73f5a94fede09be563a
|
data/CHANGELOG.md
CHANGED
@@ -7,10 +7,10 @@ module Markdiff
|
|
7
7
|
def inserted_node
|
8
8
|
if target_node.name == "li"
|
9
9
|
target_node["class"] = "removed"
|
10
|
-
target_node.inner_html =
|
10
|
+
target_node.inner_html = %(<del class="del">#{target_node.inner_html}</del>)
|
11
11
|
target_node
|
12
12
|
else
|
13
|
-
|
13
|
+
%(<del class="del">#{target_node}</del>)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -18,7 +18,7 @@ module Markdiff
|
|
18
18
|
::Diff::LCS.diff(before_elements, after_elements).flatten.each do |operation|
|
19
19
|
type, position, element = *operation
|
20
20
|
if type == "-"
|
21
|
-
before_elements[position] =
|
21
|
+
before_elements[position] = %(<del class="del">#{element}</del>)
|
22
22
|
else
|
23
23
|
before_elements[position] = "#{before_elements[position]}<ins>#{element}</ins>"
|
24
24
|
end
|
data/lib/markdiff/version.rb
CHANGED