algolia_html_extractor 2.5.0 → 2.5.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: aa9a514d606789d1051a59e59437d9c470e21898
4
- data.tar.gz: 1fd878c504bc329d8efd8798f2bd0a45f77f414e
3
+ metadata.gz: 9944d514907702afbbcf6c176fa83c961bee97ee
4
+ data.tar.gz: abe9a382fb695023abd965f0e5809311400da1c3
5
5
  SHA512:
6
- metadata.gz: 85e8af8f3ff600767fc791a3b1316cc95aa8f69d0eea8277925fbee663d430dd4d9996efa8e6670bbca5753b174f45910d34e259d555f86e88bc625bdebfbded
7
- data.tar.gz: 486563d73cd49932bb8761daa2d7fd1f931084a25eb374f4c6605ec53f48acdc96397649bcc61c990197a6848d7f07c9b52e31659987fc8b0e0c3e4c106f279b
6
+ metadata.gz: 194f4e3fe482f40c1dfb43e40352eea7d24f822870d0686b047a0e87d01d4270621a4ffa2c81fc86334b3f75a6801c05e0c799a8d03f9c2b29dcc440140b600c
7
+ data.tar.gz: 7c0b204aef8574ef685c65c1198d5919b00e5936fbc8d90f0101c6f2c0b07d6c630743566e2e935824cbb638c300bd4fccecc219217792d2693c3e265970ead6
@@ -2,7 +2,7 @@ require 'nokogiri'
2
2
  require 'digest/md5'
3
3
 
4
4
  # Extract content from an HTML page in the form of items with associated
5
- # hierarchy data
5
+ # headings data
6
6
  module AlgoliaHTMLExtractor
7
7
  # Extractor options, applying default options when none set
8
8
  def self.default_options(options)
@@ -33,7 +33,7 @@ module AlgoliaHTMLExtractor
33
33
  lvl5: nil
34
34
  }
35
35
  current_position = 0 # Position of the DOM node in the tree
36
- current_lvl = nil # Current closest hierarchy level
36
+ current_lvl = nil # Current closest headings level
37
37
  current_anchor = nil # Current closest anchor
38
38
 
39
39
  # We select all nodes that match either the headings or the elements to
@@ -63,7 +63,7 @@ module AlgoliaHTMLExtractor
63
63
  item = {
64
64
  html: extract_html(node),
65
65
  content: content,
66
- hierarchy: current_hierarchy.values.compact,
66
+ headings: current_hierarchy.values.compact,
67
67
  anchor: current_anchor,
68
68
  node: node,
69
69
  custom_ranking: {
@@ -1,6 +1,6 @@
1
1
  # Expose gem version
2
2
  # rubocop:disable Style/SingleLineMethods
3
3
  class AlgoliaHTMLExtractorVersion
4
- def self.to_s; '2.5.0' end
4
+ def self.to_s; '2.5.1' end
5
5
  end
6
6
  # rubocop:enable Style/SingleLineMethods
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: algolia_html_extractor
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Carry