jekyll-webmention_io 2.8.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a5fc8540b37c11c6a5c8cabc941a0a8abfb6d28
4
- data.tar.gz: b2c35dd389644a77a84b198efc998dcdc6dc3773
3
+ metadata.gz: 853ad5dd69a34182ded002eab482e6635fa47f19
4
+ data.tar.gz: 01e6b57b32d543a062ee11bd9429089584b31b8f
5
5
  SHA512:
6
- metadata.gz: 5ee6dd28ea2cab6e24e6b13c49f32e626188b223824b04da05978ada666ee778673a3d7e299afaa74ae37bddc0b95198914fbb08b066832816198a831e05b837
7
- data.tar.gz: 9ad5fd09b1bbc9d5961647359c10e69bd1654619dc4d42abbf10b7195c71c253a8078fddfc2f9cf73e85948f4ae93e897d9f90d6303d6d119d8ef31dd453bd66
6
+ metadata.gz: e7f49b9dadd24e3473bfd87a857a1269947071031bd1d5f09cbf731139d420f5508bb07c9c6b0d8425b53fbce0946047910cdc95ec51ba56be59ada34ec8116d
7
+ data.tar.gz: 859d5512738ff5217ff5b8e2cb410d2f962fb018d5955af1340b7c65facf8688cca856ad99a1e7273b1152ca16309959f89125152510371c267c267d33db1db3
@@ -2,16 +2,16 @@
2
2
 
3
3
  // prerequisites
4
4
  if ( ! ( 'querySelectorAll' in document ) ||
5
- ! ( 'filter' in [] ) ||
6
- ! ( 'content' in document.createElement('template') ) ){ return; }
7
-
5
+ ! ( 'filter' in [] ) ||
6
+ ! ( 'content' in document.createElement('template') ) ){ return; }
7
+
8
8
  if ( ! ( 'JekyllWebmentionIO' in window ) ){ window.JekyllWebmentionIO = {}; }
9
9
 
10
10
  //
11
11
  // Public Properties
12
12
  //
13
13
  JekyllWebmentionIO.existing_webmentions = [];
14
-
14
+
15
15
  //
16
16
  // Public Methods
17
17
  //
@@ -128,7 +128,7 @@
128
128
 
129
129
  // Add to the queues
130
130
  if ( 'dataset' in $webmention_collection &&
131
- 'webmentionTypes' in $webmention_collection.dataset )
131
+ 'webmentionTypes' in $webmention_collection.dataset )
132
132
  {
133
133
  types = $webmention_collection.dataset.webmentionTypes.split(',');
134
134
  }
@@ -232,7 +232,7 @@
232
232
  template = $webmention_collection.template,
233
233
  mode = 'append',
234
234
  html;
235
-
235
+
236
236
  // Already working with a list
237
237
  if ( $list )
238
238
  {
@@ -283,10 +283,10 @@
283
283
  webmentions[i].id = id + '';
284
284
  }
285
285
 
286
- // console.log( webmentions.length, 'IDs rationalized' );
286
+ //console.log( webmentions.length, 'IDs rationalized' );
287
287
  return webmentions;
288
288
  }
289
-
289
+
290
290
  // Removes duplicate webmentions
291
291
  function removeDuplicates( webmentions )
292
292
  {
@@ -303,13 +303,14 @@
303
303
  if ( JekyllWebmentionIO.existing_webmentions.indexOf( webmentions[i].id ) < 0 )
304
304
  {
305
305
  unique_webmentions.push(webmentions[i]);
306
+ JekyllWebmentionIO.existing_webmentions.push(webmentions[i].id);
306
307
  }
307
308
  }
308
309
 
309
- // console.log( 'removed', webmentions.length - unique_webmentions.length, 'duplicates' );
310
+ // console.log( 'removed', webmentions.length - unique_webmentions.length, 'duplicates', unique_webmentions );
310
311
  return unique_webmentions;
311
312
  }
312
-
313
+
313
314
  // Adds the necessary metadata to each webmention object for the liquid templates
314
315
  function addMetadata( webmentions )
315
316
  {
@@ -241,7 +241,7 @@ module Jekyll
241
241
  # Everything else
242
242
  content = link['activity']['sentence_html']
243
243
  if ['post', 'reply', 'link'].include? type
244
- content = link['data']['content'] unless link['data']['content'].empty?
244
+ content = link['data']['content'] if link.dig( 'data', 'content' )
245
245
  end
246
246
  webmention['content'] = markdownify( content )
247
247
 
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module WebmentionIO
3
- VERSION = "2.8.0".freeze
3
+ VERSION = "2.8.1".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-webmention_io
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Gustafson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-25 00:00:00.000000000 Z
11
+ date: 2017-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -269,7 +269,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
269
269
  version: '0'
270
270
  requirements: []
271
271
  rubyforge_project:
272
- rubygems_version: 2.6.12
272
+ rubygems_version: 2.6.13
273
273
  signing_key:
274
274
  specification_version: 4
275
275
  summary: A Jekyll plugin for sending & receiving webmentions via Webmention.io.