18 lines
486 B
Python
18 lines
486 B
Python
# This is an attempt to create a customizable way to
|
|
# add filters to the content coming from the etherpad
|
|
# get_text api endpoint
|
|
# in pad_filters.py do this:
|
|
#
|
|
# import re
|
|
# from filter_registry import register_filter
|
|
|
|
# @register_filter
|
|
# def remove_star_before_img(text):
|
|
# return re.sub(r'\*\s*!?\[\]\(', '
|
|
|
|
pad_content_filters = []
|
|
|
|
def register_filter(func):
|
|
print(f"Registering filter: {func.__name__}")
|
|
pad_content_filters.append(func)
|
|
return func |