src/pyams_utils/text.py
changeset 36 7398e25bad99
parent 35 ff081a708652
child 71 01d01045a2b7
equal deleted inserted replaced
35:ff081a708652 36:7398e25bad99
    57     if (index > 0) and (text_length > index + max):
    57     if (index > 0) and (text_length > index + max):
    58         return result[:index] + '…'
    58         return result[:index] + '…'
    59     return text
    59     return text
    60 
    60 
    61 
    61 
    62 @adapter_config(name='text', context=(str, IRequest), provides=IHTMLRenderer)
    62 @adapter_config(name='raw', context=(str, IRequest), provides=IHTMLRenderer)
    63 class BaseHTMLRenderer(object):
    63 class BaseHTMLRenderer(object):
    64     """Raw text renderer utility class"""
    64     """Raw text renderer utility class"""
    65 
    65 
    66     def __init__(self, context, request):
    66     def __init__(self, context, request):
    67         self.context = context
    67         self.context = context