INNER CODE UNIT · Python
style
neuml/tldrstory · src/python/tldrstory/app.py:182
def style(config, value):
"""
Renders a style span.
Args:
config: style configuration
value: input value
Returns:
styled result
"""
for low, high, name, style in config:
if low <= value <= high:
return '<span style="{}">{}</span>'.format(style, name)
return None