kramdown-prismic 0.3.2 → 0.3.3

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
  SHA256:
3
- metadata.gz: 1ee09d3336016df7164dd139beccbdf493e4fa5c057b2c3d6480d1db7c352da4
4
- data.tar.gz: 2b14fca6c580875817413ec64d3f5fc015ef00544ddf7a4aff6bfe0edb8e160c
3
+ metadata.gz: ba6d3ad52704c02e2ec102cc69ca216f02c464ba6cde85c2f28024c66448a985
4
+ data.tar.gz: 64fdd7184a0184c10b72acb00d2109f1b3512fc53392327a5f537d091d5796ce
5
5
  SHA512:
6
- metadata.gz: 4a3b05a335d537eedcd4ab32f45dfd7fd28f258c7557a7efe087a8e98b77d1b65922c012c9b5737939d7ea6d1651117061d3158aad626c510408091abb4d210a
7
- data.tar.gz: cf73a15a0961791104991790e2f46ee031d80f0265fdaca1e14601822747b43a815af87a7e3c74bb0a8e60774ec847b6e46e6b0bd0eca5a46b2bffe962ede4fe
6
+ metadata.gz: ea6f89410664900030c17478ed4cce6fb6a499974ef775f421fd1b720e7f28e123526eb1893889f42d8964928a1c2139387f2dae408a3ea19dffc50805430918
7
+ data.tar.gz: 95c6df198bfdacb61f24606575d4fd5d517b1285750a4dd463f15cc0416513759aec67183eb3820c64c221d5154acbb826e0a74b7e9f797ddfff7cbb2bbae165
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 0.3.3
4
+
5
+ - Renable converting xml comments
6
+
3
7
  ## Version 0.3.2
4
8
 
5
9
  - Parse ordered and unordered lists
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kramdown-prismic (0.3.2)
4
+ kramdown-prismic (0.3.3)
5
5
  kramdown (>= 1, < 3)
6
6
 
7
7
  GEM
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KramdownPrismic
4
- VERSION = '0.3.2'
4
+ VERSION = '0.3.3'
5
5
  end
@@ -187,6 +187,11 @@ module Kramdown
187
187
  nil
188
188
  end
189
189
 
190
+ def convert_xml_comment(_element)
191
+ warning('translating xml comment is not supported')
192
+ nil
193
+ end
194
+
190
195
  def convert_raw(_element)
191
196
  warning('translating raw is not supported')
192
197
  nil
@@ -268,6 +273,10 @@ module Kramdown
268
273
  memo[:text] += element.value
269
274
  end
270
275
 
276
+ def extract_span_xml_comment(element, memo)
277
+ warning('translating xml comment is not supported')
278
+ end
279
+
271
280
  TYPOGRAPHIC_SYMS = {
272
281
  mdash: [Utils::Entities.entity('mdash')],
273
282
  ndash: [Utils::Entities.entity('ndash')],
@@ -1,3 +1,4 @@
1
+ # coding: utf-8
1
2
  # frozen_string_literal: true
2
3
 
3
4
  require 'minitest/autorun'
@@ -587,6 +588,30 @@ class KramdownPrismicConverterTest < Minitest::Test
587
588
  assert_equal 1, doc.warnings.size
588
589
  end
589
590
 
591
+ def test_convert_xml_comment
592
+ expected = []
593
+ markdown = "<!-- Main -->"
594
+ doc = Kramdown::Document.new(markdown, input: :kramdown)
595
+ assert_equal expected, doc.to_prismic
596
+ assert_equal 1, doc.warnings.size
597
+ end
598
+
599
+ def test_convert_span_xml_comment
600
+ expected = [
601
+ {
602
+ type: 'paragraph',
603
+ content: {
604
+ text: 'test test',
605
+ spans: []
606
+ }
607
+ }
608
+ ]
609
+ markdown = "test <!-- Main --> test"
610
+ doc = Kramdown::Document.new(markdown, input: :kramdown)
611
+ assert_equal expected, doc.to_prismic
612
+ assert_equal 1, doc.warnings.size
613
+ end
614
+
590
615
  def test_convert_comment
591
616
  expected = []
592
617
  markdown = "{::comment}\nComment\n{:/comment}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kramdown-prismic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - François de Metz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-16 00:00:00.000000000 Z
11
+ date: 2021-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kramdown