[DEV] better display

This commit is contained in:
2013-12-28 12:44:01 +01:00
parent 7d217467dc
commit 5e80692aa8
3 changed files with 144 additions and 60 deletions

View File

@@ -48,7 +48,7 @@ def transcode(value):
value,
flags=re.DOTALL)
value = re.sub(r'\[color=(\#[0-9A-F]{6}|[a-z\-]+)\](.*?)\[/color\]',
value = re.sub(r'\[color=(\(#[0-9A-F]{6}|[a-z\-]+|.+?)\](.*?)\[/color\]',
r'<span style="color: \1;">\2</span>',
value,
flags=re.DOTALL)
@@ -83,6 +83,11 @@ def transcode(value):
value,
flags=re.DOTALL)
value = re.sub(r'\[pre\]((\\\[|\\\]|.)*?)\[/pre\]',
r'<br/><pre>\1</pre>',
value,
flags=re.DOTALL)
value = re.sub(r'\[note\](.*?)\[/note\]',
r'<br/><b>Note:</b><pre>\1</pre>',
value,