from django import template
import re

register = template.Library()


@register.filter(name='tablescroll')
def get_due_date_string(value):
    a = re.sub(r'<table[^>]*?>', '<div style="overflow-x: auto">\g<0>', value)
    return re.sub(r'<\/table>', '</table></div>', a)
