Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate element record item being pushed to algolia #159

Open
bsubedi26 opened this issue Sep 4, 2020 · 0 comments
Open

Duplicate element record item being pushed to algolia #159

bsubedi26 opened this issue Sep 4, 2020 · 0 comments

Comments

@bsubedi26
Copy link

I want to report a bug:

For some reason, when we have a markdown file with a list item, this plugin pushes 2 record for each item. Example markdown:

* Contestant Registration – November 9-11, 2020 
* Rounds – November 10 & 11, 2020 

I logged the record in a hook before it pushes to algolia and for the 1st list item this is whats logged:

{:html=>"<li>\n    <p>Contestant Registration – November 9-11, 2020 </p>\n  </li>", :content=>"\n    Contestant Registration – November 9-11, 2020 \n  ", :headings=>["Dates"], :anchor=>"dates", :custom_ranking=>{:position=>6, :heading=>70}, :title=>"test-cloned-event", :featured_event=>true, :collection=>"events", :tags=>[], :categories=>[], :excerpt_html=>"<h3 id=\"test-event\">Test Event</h3>", :excerpt_text=>"Test Event", :slug=>"test-cloned-event", :type=>"document", :url=>"/test-cloned-event/"}

{:html=>"<p>Contestant Registration – November 9-11, 2020 </p>", :content=>"Contestant Registration – November 9-11, 2020 ", :headings=>["Dates"], :anchor=>"dates", :custom_ranking=>{:position=>7, :heading=>70}, :title=>"test-cloned-event", :featured_event=>true, :collection=>"events", :tags=>[], :categories=>[], :excerpt_html=>"<h3 id=\"test-event\">Test Event</h3>", :excerpt_text=>"Test Event", :slug=>"test-cloned-event", :type=>"document", :url=>"/test-cloned-event/"}

It seems like its creating a record for the list item with the text and another item with just the text. Shouldn't it just create 1 record with an unordered list? For example:

<ul>
  <li>Contestant Registration – November 9-11, 2020<li>
  <li>Rounds – November 10 & 11, 2020<li>
</ul>

What is the current behavior?

Duplicate element record item is being pushed to algolia.

What is your expected behavior?

Duplicate element record item should not be pushed to algolia.

Ruby version used:

2.6.3

Jekyll version used:

3.8.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant