Skip to content

Commit

Permalink
Indexer build fixes (#22)
Browse files Browse the repository at this point in the history
* Add missing __init__.py

* Format

* changelog

* fix changelog
  • Loading branch information
JeffersonBledsoe authored Mar 20, 2024
1 parent 90d720e commit c9a52eb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions news/21.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Added support for indexing custom blocks
[@JeffersonBledsoe]
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""Installer for the nswdesignsystem.plone6 package."""

from setuptools import find_packages, setup
from setuptools import find_packages
from setuptools import setup


long_description = "\n\n".join(
[
Expand Down
Empty file.
5 changes: 3 additions & 2 deletions src/nswdesignsystem/plone6/blocks/indexers.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from zope.interface import implementer
from zope.publisher.interfaces.browser import IBrowserRequest


html2text_extractor = HTML2Text()
# Remove the extra characters from formatted text
html2text_extractor.emphasis_mark = ""
Expand Down Expand Up @@ -87,7 +88,7 @@ def extract_column_data(block_data):

@implementer(IBlockSearchableText)
@adapter(IBlocks, IBrowserRequest)
class NSWSearchableText(object):
class NSWSearchableText:
def __init__(self, context, request):
self.context = context
self.request = request
Expand All @@ -101,7 +102,7 @@ def __call__(self, block_value):

@implementer(IBlockSearchableText)
@adapter(IBlocks, IBrowserRequest)
class HeroSearchableText(object):
class HeroSearchableText:
def __init__(self, context, request):
self.context = context
self.request = request
Expand Down

0 comments on commit c9a52eb

Please sign in to comment.