kramdown-prismic 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/kramdown-prismic/version.rb +1 -1
- data/lib/kramdown/converter/prismic.rb +5 -0
- data/test/kramdown-prismic_test.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13cce49c2e7957ffcd0c71c62f18faff08817a27
|
4
|
+
data.tar.gz: c637b24628b1c21d3b420e77b2468f3d257b38cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa1db25fb05c4fd1cc55d67b47db51bad9405a1dc22e215a8d749f8588b60b3c663b5d3e850b319261c284cfb9242dcbbbb9cb909ad98ec4f1d294bc0f4b5dfd
|
7
|
+
data.tar.gz: 6033c3434686ec767e255cb9aaa925abe5fc9587e00a344c6bc6fdc641dc1a86616777aeb60303228f0d79c5504955ba0377861329f305246b927750fa539edc
|
data/Gemfile.lock
CHANGED
@@ -116,6 +116,11 @@ module Kramdown
|
|
116
116
|
}
|
117
117
|
end
|
118
118
|
|
119
|
+
def convert_html_element(element)
|
120
|
+
warning('translating html elements is not supported')
|
121
|
+
nil
|
122
|
+
end
|
123
|
+
|
119
124
|
def extract_content(element, memo={text: '', spans: []})
|
120
125
|
element.children.inject(memo) do |memo2, child|
|
121
126
|
send("extract_span_#{child.type}", child, memo2)
|
@@ -357,6 +357,14 @@ class KramdownPrismicTest < Minitest::Test
|
|
357
357
|
assert_equal expected, Kramdown::Document.new(html, input: :html).to_prismic
|
358
358
|
end
|
359
359
|
|
360
|
+
def test_convert_html
|
361
|
+
expected = []
|
362
|
+
html = "<div></div>"
|
363
|
+
doc = Kramdown::Document.new(html, input: :markdown)
|
364
|
+
assert_equal expected, doc.to_prismic
|
365
|
+
assert_equal 1, doc.warnings.size
|
366
|
+
end
|
367
|
+
|
360
368
|
def test_convert_span_html
|
361
369
|
expected = [
|
362
370
|
{type: "paragraph",
|