HighlightMacro: Highlight.py

File Highlight.py, 286 bytes (added by relaxdiego, 4 years ago)
Line 
1 from StringIO import StringIO
2 import re
3
4 def execute(hdf, args, env):
5     arguments = re.split('\s*,\s*', args)
6
7     buf = StringIO()
8
9     buf.write('<span style="background-color:#%s">' % arguments[0])
10     buf.write('%s</span>' % arguments[1])
11
12     return buf.getvalue()