Skip to content

Commit

Permalink
feat: Added webhook sample
Browse files Browse the repository at this point in the history
Refs: #30
  • Loading branch information
pbezliapovich committed Aug 9, 2024
1 parent f653212 commit 93b779c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/TableCellAutoHeightSetter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
def process_html():
html_content = request.form.get('html')
if html_content:
pattern = r'(<(?:td|th)[^>]*\sheight:\s*)\d+(\.\d+)?px'
html_content = re.sub(pattern, r'\1auto', string=html_content)
pattern = r'(<t[dh].+?height:.*?)(\d+px)'
html_content = re.sub(pattern, lambda m: m.group(1) + "auto", html_content)

response = Response(html_content, mimetype="text/html", status=200)
return response
Expand Down

0 comments on commit 93b779c

Please sign in to comment.